diff --git a/.eslintignore b/.eslintignore index a6c177711..a481ae355 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,8 +1,5 @@ bin coverage dist -example/*.ts examples -**/generated/* -**/expected/* -**/specs/* +test/fixtures diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3bd654e35..820368b0d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -4,6 +4,15 @@ module.exports = { parserOptions: { project: ["./tsconfig.json"], }, - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], + extends: ["plugin:prettier/recommended", "eslint:recommended", "plugin:@typescript-eslint/recommended"], plugins: ["@typescript-eslint"], + overrides: [ + { + files: ["**/*.test.*"], + rules: { + "@typescript-eslint/ban-ts-comment": "off", // allow @ts-ignore only in tests + "@typescript-eslint/no-empty-function": "off", // don’t enforce this in tests + }, + }, + ], }; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f56bfb67..b7ca23827 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: - main pull_request: +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-22.04 @@ -18,11 +22,22 @@ jobs: - run: pnpm i - run: npm run lint test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: pnpm i + - run: npm run test:coverage + test-node-versions: + runs-on: ubuntu-22.04 strategy: matrix: - node-version: [16.x, 18.x] - os: [macos-12, ubuntu-22.04, windows-2022] - runs-on: ${{ matrix.os }} + node-version: [16.x, 19.x] steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 @@ -33,8 +48,15 @@ jobs: node-version: ${{ matrix.node-version }} - run: pnpm i - run: npm test - if: matrix.os != 'macos-12' || matrix.node-version != '18.x' - - run: npm run test:coverage - if: matrix.os == 'macos-12' && matrix.node-version == '18.x' - - uses: codecov/codecov-action@v3 - if: matrix.os == 'macos-12' && matrix.node-version == '18.x' + test-macos: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + version: 18 + - run: pnpm i + - run: npm test diff --git a/.gitignore b/.gitignore index edf334531..d65b57e1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -test/fixtures/*.yaml coverage/ dist node_modules +test/fixtures/**/* diff --git a/.prettierignore b/.prettierignore index b3995512b..20435f33b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ examples/**/*.ts +test/fixtures/**/* *.md *.yaml *.yml diff --git a/bin/cli.js b/bin/cli.js index a5eea4956..4ea5b44c8 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -5,10 +5,7 @@ import { URL } from "node:url"; import glob from "fast-glob"; import parser from "yargs-parser"; import openapiTS from "../dist/index.js"; - -const GREEN = "\u001b[32m"; -const BOLD = "\u001b[1m"; -const RESET = "\u001b[0m"; +import { c, error } from "../dist/utils.js"; const HELP = `Usage $ openapi-typescript [input] [options] @@ -38,11 +35,6 @@ const HTTP_RE = /^https?:\/\//; const timeStart = process.hrtime(); -function errorAndExit(errorMessage) { - process.exitCode = 1; // needed for async functions - throw new Error(errorMessage); -} - const [, , ...args] = process.argv; if (args.includes("-ap")) errorAndExit(`The -ap alias has been deprecated. Use "--additional-properties" instead.`); if (args.includes("-it")) errorAndExit(`The -it alias has been deprecated. Use "--immutable-types" instead.`); @@ -123,7 +115,7 @@ async function generateSchema(pathToSpec) { const timeEnd = process.hrtime(timeStart); const time = timeEnd[0] + Math.round(timeEnd[1] / 1e6); - console.log(`🚀 ${GREEN}${pathToSpec} -> ${BOLD}${outputFilePath}${RESET}${GREEN} [${time}ms]${RESET}`); + console.log(`🚀 ${c.green(`${pathToSpec} → ${c.bold(outputFilePath)}`)} ${c.dim(`[${time}ms]`)}`); } else { process.stdout.write(result); // if stdout, (still) don’t log anything to console! @@ -147,9 +139,7 @@ async function main() { let outputFile = new URL(flags.output, CWD); let outputDir = new URL(".", outputFile); - if (output === OUTPUT_FILE) { - console.info(`✨ ${BOLD}openapi-typescript ${packageJSON.version}${RESET}`); // only log if we’re NOT writing to stdout - } + if (output === OUTPUT_FILE) console.info(`✨ ${c.bold(`openapi-typescript ${packageJSON.version}`)}`); // only log if we’re NOT writing to stdout const pathToSpec = flags._[0]; @@ -173,12 +163,14 @@ async function main() { // error: no matches for glob if (inputSpecPaths.length === 0) { - errorAndExit(`✘ Could not find any specs matching "${pathToSpec}". Please check that the path is correct.`); + error(`Could not find any specs matching "${pathToSpec}". Please check that the path is correct.`); + process.exit(1); } // error: tried to glob output to single file if (isGlob && output === OUTPUT_FILE && fs.existsSync(outputDir) && fs.lstatSync(outputDir).isFile()) { - errorAndExit(`✘ Expected directory for --output if using glob patterns. Received "${flags.output}".`); + error(`Expected directory for --output if using glob patterns. Received "${flags.output}".`); + process.exit(1); } // generate schema(s) in parallel diff --git a/examples/digital-ocean-api.ts b/examples/digital-ocean-api.ts new file mode 100644 index 000000000..d8a1e6c52 --- /dev/null +++ b/examples/digital-ocean-api.ts @@ -0,0 +1,13440 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +/** 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 { + "/v2/1-clicks": { + get: external["resources/1-clicks/oneClicks_list.yml"] + }; + "/v2/1-clicks/kubernetes": { + post: external["resources/1-clicks/oneClicks_install_kubernetes.yml"] + }; + "/v2/account": { + get: external["resources/account/account_get.yml"] + }; + "/v2/account/keys": { + get: external["resources/ssh_keys/sshKeys_list.yml"] + post: external["resources/ssh_keys/sshKeys_create.yml"] + }; + "/v2/account/keys/{ssh_key_identifier}": { + get: external["resources/ssh_keys/sshKeys_get.yml"] + put: external["resources/ssh_keys/sshKeys_update.yml"] + delete: external["resources/ssh_keys/sshKeys_delete.yml"] + }; + "/v2/actions": { + get: external["resources/actions/actions_list.yml"] + }; + "/v2/actions/{action_id}": { + get: external["resources/actions/actions_get.yml"] + }; + "/v2/apps": { + get: external["resources/apps/apps_list.yml"] + post: external["resources/apps/apps_create.yml"] + }; + "/v2/apps/{id}": { + get: external["resources/apps/apps_get.yml"] + put: external["resources/apps/apps_update.yml"] + delete: external["resources/apps/apps_delete.yml"] + }; + "/v2/apps/{app_id}/deployments": { + get: external["resources/apps/apps_list_deployments.yml"] + post: external["resources/apps/apps_create_deployment.yml"] + }; + "/v2/apps/{app_id}/deployments/{deployment_id}": { + get: external["resources/apps/apps_get_deployment.yml"] + }; + "/v2/apps/{app_id}/deployments/{deployment_id}/cancel": { + post: external["resources/apps/apps_cancel_deployment.yml"] + }; + "/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs": { + get: external["resources/apps/apps_get_logs.yml"] + }; + "/v2/apps/{app_id}/deployments/{deployment_id}/logs": { + get: external["resources/apps/apps_get_logsAggregate.yml"] + }; + "/v2/apps/tiers": { + get: external["resources/apps/apps_list_tiers.yml"] + }; + "/v2/apps/tiers/{slug}": { + get: external["resources/apps/apps_get_tier.yml"] + }; + "/v2/apps/tiers/instance_sizes": { + get: external["resources/apps/apps_list_instanceSizes.yml"] + }; + "/v2/apps/tiers/instance_sizes/{slug}": { + get: external["resources/apps/apps_get_instanceSize.yml"] + }; + "/v2/apps/regions": { + get: external["resources/apps/apps_list_regions.yml"] + }; + "/v2/apps/propose": { + post: external["resources/apps/apps_validate_appSpec.yml"] + }; + "/v2/apps/{app_id}/alerts": { + get: external["resources/apps/apps_list_alerts.yml"] + }; + "/v2/apps/{app_id}/alerts/{alert_id}/destinations": { + post: external["resources/apps/apps_assign_alertDestinations.yml"] + }; + "/v2/apps/{app_id}/rollback": { + post: external["resources/apps/apps_create_rollback.yml"] + }; + "/v2/apps/{app_id}/rollback/validate": { + post: external["resources/apps/apps_validate_rollback.yml"] + }; + "/v2/apps/{app_id}/rollback/commit": { + post: external["resources/apps/apps_commit_rollback.yml"] + }; + "/v2/apps/{app_id}/rollback/revert": { + post: external["resources/apps/apps_revert_rollback.yml"] + }; + "/v2/cdn/endpoints": { + get: external["resources/cdn/cdn_list_endpoints.yml"] + post: external["resources/cdn/cdn_create_endpoint.yml"] + }; + "/v2/cdn/endpoints/{cdn_id}": { + get: external["resources/cdn/cdn_get_endpoint.yml"] + put: external["resources/cdn/cdn_update_endpoint.yml"] + delete: external["resources/cdn/cdn_delete_endpoint.yml"] + }; + "/v2/cdn/endpoints/{cdn_id}/cache": { + delete: external["resources/cdn/cdn_purge_cache.yml"] + }; + "/v2/certificates": { + get: external["resources/certificates/certificates_list.yml"] + post: external["resources/certificates/certificates_create.yml"] + }; + "/v2/certificates/{certificate_id}": { + get: external["resources/certificates/certificates_get.yml"] + delete: external["resources/certificates/certificates_delete.yml"] + }; + "/v2/customers/my/balance": { + get: external["resources/billing/balance_get.yml"] + }; + "/v2/customers/my/billing_history": { + get: external["resources/billing/billingHistory_list.yml"] + }; + "/v2/customers/my/invoices": { + get: external["resources/billing/invoices_list.yml"] + }; + "/v2/customers/my/invoices/{invoice_uuid}": { + get: external["resources/billing/invoices_get_byUUID.yml"] + }; + "/v2/customers/my/invoices/{invoice_uuid}/csv": { + get: external["resources/billing/invoices_get_csvByUUID.yml"] + }; + "/v2/customers/my/invoices/{invoice_uuid}/pdf": { + get: external["resources/billing/invoices_get_pdfByUUID.yml"] + }; + "/v2/customers/my/invoices/{invoice_uuid}/summary": { + get: external["resources/billing/invoices_get_summaryByUUID.yml"] + }; + "/v2/databases/options": { + get: external["resources/databases/databases_list_options.yml"] + }; + "/v2/databases": { + get: external["resources/databases/databases_list_clusters.yml"] + post: external["resources/databases/databases_create_cluster.yml"] + }; + "/v2/databases/{database_cluster_uuid}": { + get: external["resources/databases/databases_get_cluster.yml"] + delete: external["resources/databases/databases_destroy_cluster.yml"] + }; + "/v2/databases/{database_cluster_uuid}/config": { + get: external["resources/databases/databases_get_config.yml"] + patch: external["resources/databases/databases_patch_config.yml"] + }; + "/v2/databases/{database_cluster_uuid}/ca": { + get: external["resources/databases/databases_get_ca.yml"] + }; + "/v2/databases/{database_cluster_uuid}/online-migration": { + get: external["resources/databases/databases_get_migrationStatus.yml"] + put: external["resources/databases/databases_update_onlineMigration.yml"] + }; + "/v2/databases/{database_cluster_uuid}/online-migration/{migration_id}": { + delete: external["resources/databases/databases_delete_onlineMigration.yml"] + }; + "/v2/databases/{database_cluster_uuid}/migrate": { + put: external["resources/databases/databases_update_region.yml"] + }; + "/v2/databases/{database_cluster_uuid}/resize": { + put: external["resources/databases/databases_update_clusterSize.yml"] + }; + "/v2/databases/{database_cluster_uuid}/firewall": { + get: external["resources/databases/databases_list_firewall_rules.yml"] + put: external["resources/databases/databases_update_firewall_rules.yml"] + }; + "/v2/databases/{database_cluster_uuid}/maintenance": { + put: external["resources/databases/databases_update_maintenanceWindow.yml"] + }; + "/v2/databases/{database_cluster_uuid}/backups": { + get: external["resources/databases/databases_list_backups.yml"] + }; + "/v2/databases/{database_cluster_uuid}/replicas": { + get: external["resources/databases/databases_list_replicas.yml"] + post: external["resources/databases/databases_create_replica.yml"] + }; + "/v2/databases/{database_cluster_uuid}/replicas/{replica_name}": { + get: external["resources/databases/databases_get_replica.yml"] + delete: external["resources/databases/databases_destroy_replica.yml"] + }; + "/v2/databases/{database_cluster_uuid}/users": { + get: external["resources/databases/databases_list_users.yml"] + post: external["resources/databases/databases_add_user.yml"] + }; + "/v2/databases/{database_cluster_uuid}/users/{username}": { + get: external["resources/databases/databases_get_user.yml"] + delete: external["resources/databases/databases_delete_user.yml"] + }; + "/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth": { + post: external["resources/databases/databases_reset_auth.yml"] + }; + "/v2/databases/{database_cluster_uuid}/dbs": { + get: external["resources/databases/databases_list.yml"] + post: external["resources/databases/databases_add.yml"] + }; + "/v2/databases/{database_cluster_uuid}/dbs/{database_name}": { + get: external["resources/databases/databases_get.yml"] + delete: external["resources/databases/databases_delete.yml"] + }; + "/v2/databases/{database_cluster_uuid}/pools": { + get: external["resources/databases/databases_list_connectionPools.yml"] + post: external["resources/databases/databases_add_connectionPool.yml"] + }; + "/v2/databases/{database_cluster_uuid}/pools/{pool_name}": { + get: external["resources/databases/databases_get_connectionPool.yml"] + delete: external["resources/databases/databases_delete_connectionPool.yml"] + }; + "/v2/databases/{database_cluster_uuid}/eviction_policy": { + get: external["resources/databases/databases_get_evictionPolicy.yml"] + put: external["resources/databases/databases_update_evictionPolicy.yml"] + }; + "/v2/databases/{database_cluster_uuid}/sql_mode": { + get: external["resources/databases/databases_get_sql_mode.yml"] + put: external["resources/databases/databases_update_sql_mode.yml"] + }; + "/v2/domains": { + get: external["resources/domains/domains_list.yml"] + post: external["resources/domains/domains_create.yml"] + }; + "/v2/domains/{domain_name}": { + get: external["resources/domains/domains_get.yml"] + delete: external["resources/domains/domains_delete.yml"] + }; + "/v2/domains/{domain_name}/records": { + get: external["resources/domains/domains_list_records.yml"] + post: external["resources/domains/domains_create_record.yml"] + }; + "/v2/domains/{domain_name}/records/{domain_record_id}": { + get: external["resources/domains/domains_get_record.yml"] + put: external["resources/domains/domains_update_record.yml"] + delete: external["resources/domains/domains_delete_record.yml"] + patch: external["resources/domains/domains_patch_record.yml"] + }; + "/v2/droplets": { + get: external["resources/droplets/droplets_list.yml"] + post: external["resources/droplets/droplets_create.yml"] + delete: external["resources/droplets/droplets_destroy_byTag.yml"] + }; + "/v2/droplets/{droplet_id}": { + get: external["resources/droplets/droplets_get.yml"] + delete: external["resources/droplets/droplets_destroy.yml"] + }; + "/v2/droplets/{droplet_id}/backups": { + get: external["resources/droplets/droplets_list_backups.yml"] + }; + "/v2/droplets/{droplet_id}/snapshots": { + get: external["resources/droplets/droplets_list_snapshots.yml"] + }; + "/v2/droplets/{droplet_id}/actions": { + get: external["resources/droplets/dropletActions_list.yml"] + post: external["resources/droplets/dropletActions_post.yml"] + }; + "/v2/droplets/actions": { + post: external["resources/droplets/dropletActions_post_byTag.yml"] + }; + "/v2/droplets/{droplet_id}/actions/{action_id}": { + get: external["resources/droplets/dropletActions_get.yml"] + }; + "/v2/droplets/{droplet_id}/kernels": { + get: external["resources/droplets/droplets_list_kernels.yml"] + }; + "/v2/droplets/{droplet_id}/firewalls": { + get: external["resources/droplets/droplets_list_firewalls.yml"] + }; + "/v2/droplets/{droplet_id}/neighbors": { + get: external["resources/droplets/droplets_list_neighbors.yml"] + }; + "/v2/droplets/{droplet_id}/destroy_with_associated_resources": { + get: external["resources/droplets/droplets_list_associatedResources.yml"] + }; + "/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective": { + delete: external["resources/droplets/droplets_destroy_withAssociatedResourcesSelective.yml"] + }; + "/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous": { + delete: external["resources/droplets/droplets_destroy_withAssociatedResourcesDangerous.yml"] + }; + "/v2/droplets/{droplet_id}/destroy_with_associated_resources/status": { + get: external["resources/droplets/droplets_get_destroyAssociatedResourcesStatus.yml"] + }; + "/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry": { + post: external["resources/droplets/droplets_destroy_retryWithAssociatedResources.yml"] + }; + "/v2/firewalls": { + get: external["resources/firewalls/firewalls_list.yml"] + post: external["resources/firewalls/firewalls_create.yml"] + }; + "/v2/firewalls/{firewall_id}": { + get: external["resources/firewalls/firewalls_get.yml"] + put: external["resources/firewalls/firewalls_update.yml"] + delete: external["resources/firewalls/firewalls_delete.yml"] + }; + "/v2/firewalls/{firewall_id}/droplets": { + post: external["resources/firewalls/firewalls_assign_droplets.yml"] + delete: external["resources/firewalls/firewalls_delete_droplets.yml"] + }; + "/v2/firewalls/{firewall_id}/tags": { + post: external["resources/firewalls/firewalls_add_tags.yml"] + delete: external["resources/firewalls/firewalls_delete_tags.yml"] + }; + "/v2/firewalls/{firewall_id}/rules": { + post: external["resources/firewalls/firewalls_add_rules.yml"] + delete: external["resources/firewalls/firewalls_delete_rules.yml"] + }; + "/v2/floating_ips": { + get: external["resources/floating_ips/floatingIPs_list.yml"] + post: external["resources/floating_ips/floatingIPs_create.yml"] + }; + "/v2/floating_ips/{floating_ip}": { + get: external["resources/floating_ips/floatingIPs_get.yml"] + delete: external["resources/floating_ips/floatingIPs_delete.yml"] + }; + "/v2/floating_ips/{floating_ip}/actions": { + get: external["resources/floating_ips/floatingIPsAction_list.yml"] + post: external["resources/floating_ips/floatingIPsAction_post.yml"] + }; + "/v2/floating_ips/{floating_ip}/actions/{action_id}": { + get: external["resources/floating_ips/floatingIPsAction_get.yml"] + }; + "/v2/functions/namespaces": { + get: external["resources/functions/functions_list_namespaces.yml"] + post: external["resources/functions/functions_create_namespace.yml"] + }; + "/v2/functions/namespaces/{namespace_id}": { + get: external["resources/functions/functions_get_namespace.yml"] + delete: external["resources/functions/functions_delete_namespace.yml"] + }; + "/v2/images": { + get: external["resources/images/images_list.yml"] + post: external["resources/images/images_create_custom.yml"] + }; + "/v2/images/{image_id}": { + get: external["resources/images/images_get.yml"] + put: external["resources/images/images_update.yml"] + delete: external["resources/images/images_delete.yml"] + }; + "/v2/images/{image_id}/actions": { + get: external["resources/images/imageActions_list.yml"] + post: external["resources/images/imageActions_post.yml"] + }; + "/v2/images/{image_id}/actions/{action_id}": { + get: external["resources/images/imageActions_get.yml"] + }; + "/v2/kubernetes/clusters": { + get: external["resources/kubernetes/kubernetes_list_clusters.yml"] + post: external["resources/kubernetes/kubernetes_create_cluster.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}": { + get: external["resources/kubernetes/kubernetes_get_cluster.yml"] + put: external["resources/kubernetes/kubernetes_update_cluster.yml"] + delete: external["resources/kubernetes/kubernetes_delete_cluster.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources": { + get: external["resources/kubernetes/kubernetes_list_associatedResources.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/selective": { + delete: external["resources/kubernetes/kubernetes_destroy_associatedResourcesSelective.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/dangerous": { + delete: external["resources/kubernetes/kubernetes_destroy_associatedResourcesDangerous.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/kubeconfig": { + get: external["resources/kubernetes/kubernetes_get_kubeconfig.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/credentials": { + get: external["resources/kubernetes/kubernetes_get_credentials.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/upgrades": { + get: external["resources/kubernetes/kubernetes_get_availableUpgrades.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/upgrade": { + post: external["resources/kubernetes/kubernetes_upgrade_cluster.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/node_pools": { + get: external["resources/kubernetes/kubernetes_list_nodePools.yml"] + post: external["resources/kubernetes/kubernetes_add_nodePool.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}": { + get: external["resources/kubernetes/kubernetes_get_nodePool.yml"] + put: external["resources/kubernetes/kubernetes_update_nodePool.yml"] + delete: external["resources/kubernetes/kubernetes_delete_nodePool.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/nodes/{node_id}": { + delete: external["resources/kubernetes/kubernetes_delete_node.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/recycle": { + post: external["resources/kubernetes/kubernetes_recycle_nodePool.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/user": { + get: external["resources/kubernetes/kubernetes_get_clusterUser.yml"] + }; + "/v2/kubernetes/options": { + get: external["resources/kubernetes/kubernetes_list_options.yml"] + }; + "/v2/kubernetes/clusters/{cluster_id}/clusterlint": { + get: external["resources/kubernetes/kubernetes_get_clusterLintResults.yml"] + post: external["resources/kubernetes/kubernetes_run_clusterLint.yml"] + }; + "/v2/kubernetes/registry": { + post: external["resources/kubernetes/kubernetes_add_registry.yml"] + delete: external["resources/kubernetes/kubernetes_remove_registry.yml"] + }; + "/v2/load_balancers": { + get: external["resources/load_balancers/loadBalancers_list.yml"] + post: external["resources/load_balancers/loadBalancers_create.yml"] + }; + "/v2/load_balancers/{lb_id}": { + get: external["resources/load_balancers/loadBalancers_get.yml"] + put: external["resources/load_balancers/loadBalancers_update.yml"] + delete: external["resources/load_balancers/loadBalancers_delete.yml"] + }; + "/v2/load_balancers/{lb_id}/droplets": { + post: external["resources/load_balancers/loadBalancers_add_droplets.yml"] + delete: external["resources/load_balancers/loadBalancers_remove_droplets.yml"] + }; + "/v2/load_balancers/{lb_id}/forwarding_rules": { + post: external["resources/load_balancers/loadBalancers_add_forwardingRules.yml"] + delete: external["resources/load_balancers/loadBalancers_remove_forwardingRules.yml"] + }; + "/v2/monitoring/alerts": { + get: external["resources/monitoring/monitoring_list_alertPolicy.yml"] + post: external["resources/monitoring/monitoring_create_alertPolicy.yml"] + }; + "/v2/monitoring/alerts/{alert_uuid}": { + get: external["resources/monitoring/monitoring_get_alertPolicy.yml"] + put: external["resources/monitoring/monitoring_update_alertPolicy.yml"] + delete: external["resources/monitoring/monitoring_delete_alertPolicy.yml"] + }; + "/v2/monitoring/metrics/droplet/bandwidth": { + get: external["resources/monitoring/monitoring_get_dropletBandwidthMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/cpu": { + get: external["resources/monitoring/monitoring_get_DropletCpuMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/filesystem_free": { + get: external["resources/monitoring/monitoring_get_dropletFilesystemFreeMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/filesystem_size": { + get: external["resources/monitoring/monitoring_get_dropletFilesystemSizeMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/load_1": { + get: external["resources/monitoring/monitoring_get_dropletLoad1Metrics.yml"] + }; + "/v2/monitoring/metrics/droplet/load_5": { + get: external["resources/monitoring/monitoring_get_dropletLoad5Metrics.yml"] + }; + "/v2/monitoring/metrics/droplet/load_15": { + get: external["resources/monitoring/monitoring_get_dropletLoad15Metrics.yml"] + }; + "/v2/monitoring/metrics/droplet/memory_cached": { + get: external["resources/monitoring/monitoring_get_dropletMemoryCachedMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/memory_free": { + get: external["resources/monitoring/monitoring_get_dropletMemoryFreeMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/memory_total": { + get: external["resources/monitoring/monitoring_get_dropletMemoryTotalMetrics.yml"] + }; + "/v2/monitoring/metrics/droplet/memory_available": { + get: external["resources/monitoring/monitoring_get_dropletMemoryAvailableMetrics.yml"] + }; + "/v2/projects": { + get: external["resources/projects/projects_list.yml"] + post: external["resources/projects/projects_create.yml"] + }; + "/v2/projects/default": { + get: external["resources/projects/projects_get_default.yml"] + put: external["resources/projects/projects_update_default.yml"] + patch: external["resources/projects/projects_patch_default.yml"] + }; + "/v2/projects/{project_id}": { + get: external["resources/projects/projects_get.yml"] + put: external["resources/projects/projects_update.yml"] + delete: external["resources/projects/projects_delete.yml"] + patch: external["resources/projects/projects_patch.yml"] + }; + "/v2/projects/{project_id}/resources": { + get: external["resources/projects/projects_list_resources.yml"] + post: external["resources/projects/projects_assign_resources.yml"] + }; + "/v2/projects/default/resources": { + get: external["resources/projects/projects_list_resources_default.yml"] + post: external["resources/projects/projects_assign_resources_default.yml"] + }; + "/v2/regions": { + get: external["resources/regions/regions_list.yml"] + }; + "/v2/registry": { + get: external["resources/registry/registry_get.yml"] + post: external["resources/registry/registry_create.yml"] + delete: external["resources/registry/registry_delete.yml"] + }; + "/v2/registry/subscription": { + get: external["resources/registry/registry_get_subscription.yml"] + post: external["resources/registry/registry_update_subscription.yml"] + }; + "/v2/registry/docker-credentials": { + get: external["resources/registry/registry_get_dockerCredentials.yml"] + }; + "/v2/registry/validate-name": { + post: external["resources/registry/registry_validate_name.yml"] + }; + "/v2/registry/{registry_name}/repositories": { + get: external["resources/registry/registry_list_repositories.yml"] + }; + "/v2/registry/{registry_name}/repositoriesV2": { + get: external["resources/registry/registry_list_repositoriesV2.yml"] + }; + "/v2/registry/{registry_name}/{repository_name}/tags": { + get: external["resources/registry/registry_list_repositoryTags.yml"] + }; + "/v2/registry/{registry_name}/{repository_name}/tags/{repository_tag}": { + delete: external["resources/registry/registry_delete_repositoryTag.yml"] + }; + "/v2/registry/{registry_name}/{repository_name}/digests": { + get: external["resources/registry/registry_list_repositoryManifests.yml"] + }; + "/v2/registry/{registry_name}/{repository_name}/digests/{manifest_digest}": { + delete: external["resources/registry/registry_delete_repositoryManifest.yml"] + }; + "/v2/registry/{registry_name}/garbage-collection": { + get: external["resources/registry/registry_get_garbageCollection.yml"] + post: external["resources/registry/registry_run_garbageCollection.yml"] + }; + "/v2/registry/{registry_name}/garbage-collections": { + get: external["resources/registry/registry_list_garbageCollections.yml"] + }; + "/v2/registry/{registry_name}/garbage-collection/{garbage_collection_uuid}": { + put: external["resources/registry/registry_update_garbageCollection.yml"] + }; + "/v2/registry/options": { + get: external["resources/registry/registry_get_options.yml"] + }; + "/v2/reports/droplet_neighbors_ids": { + get: external["resources/droplets/droplets_list_neighborsIds.yml"] + }; + "/v2/reserved_ips": { + get: external["resources/reserved_ips/reservedIPs_list.yml"] + post: external["resources/reserved_ips/reservedIPs_create.yml"] + }; + "/v2/reserved_ips/{reserved_ip}": { + get: external["resources/reserved_ips/reservedIPs_get.yml"] + delete: external["resources/reserved_ips/reservedIPs_delete.yml"] + }; + "/v2/reserved_ips/{reserved_ip}/actions": { + get: external["resources/reserved_ips/reservedIPsActions_list.yml"] + post: external["resources/reserved_ips/reservedIPsActions_post.yml"] + }; + "/v2/reserved_ips/{reserved_ip}/actions/{action_id}": { + get: external["resources/reserved_ips/reservedIPsActions_get.yml"] + }; + "/v2/sizes": { + get: external["resources/sizes/sizes_list.yml"] + }; + "/v2/snapshots": { + get: external["resources/snapshots/snapshots_list.yml"] + }; + "/v2/snapshots/{snapshot_id}": { + get: external["resources/snapshots/snapshots_get.yml"] + delete: external["resources/snapshots/snapshots_delete.yml"] + }; + "/v2/tags": { + get: external["resources/tags/tags_list.yml"] + post: external["resources/tags/tags_create.yml"] + }; + "/v2/tags/{tag_id}": { + get: external["resources/tags/tags_get.yml"] + delete: external["resources/tags/tags_delete.yml"] + }; + "/v2/tags/{tag_id}/resources": { + post: external["resources/tags/tags_assign_resources.yml"] + delete: external["resources/tags/tags_unassign_resources.yml"] + }; + "/v2/volumes": { + get: external["resources/volumes/volumes_list.yml"] + post: external["resources/volumes/volumes_create.yml"] + delete: external["resources/volumes/volumes_delete_byName.yml"] + }; + "/v2/volumes/actions": { + post: external["resources/volumes/volumeActions_post.yml"] + }; + "/v2/volumes/snapshots/{snapshot_id}": { + get: external["resources/volumes/volumeSnapshots_get_byId.yml"] + delete: external["resources/volumes/volumeSnapshots_delete_byId.yml"] + }; + "/v2/volumes/{volume_id}": { + get: external["resources/volumes/volumes_get.yml"] + delete: external["resources/volumes/volumes_delete.yml"] + }; + "/v2/volumes/{volume_id}/actions": { + get: external["resources/volumes/volumeActions_list.yml"] + post: external["resources/volumes/volumeActions_post_byId.yml"] + }; + "/v2/volumes/{volume_id}/actions/{action_id}": { + get: external["resources/volumes/volumeActions_get.yml"] + }; + "/v2/volumes/{volume_id}/snapshots": { + get: external["resources/volumes/volumeSnapshots_list.yml"] + post: external["resources/volumes/volumeSnapshots_create.yml"] + }; + "/v2/vpcs": { + get: external["resources/vpcs/vpcs_list.yml"] + post: external["resources/vpcs/vpcs_create.yml"] + }; + "/v2/vpcs/{vpc_id}": { + get: external["resources/vpcs/vpcs_get.yml"] + put: external["resources/vpcs/vpcs_update.yml"] + delete: external["resources/vpcs/vpcs_delete.yml"] + patch: external["resources/vpcs/vpcs_patch.yml"] + }; + "/v2/vpcs/{vpc_id}/members": { + get: external["resources/vpcs/vpcs_list_members.yml"] + }; + "/v2/uptime/checks": { + get: external["resources/uptime/list_checks.yml"] + post: external["resources/uptime/create_check.yml"] + }; + "/v2/uptime/checks/{check_id}": { + get: external["resources/uptime/get_check.yml"] + put: external["resources/uptime/update_check.yml"] + delete: external["resources/uptime/delete_check.yml"] + }; + "/v2/uptime/checks/{check_id}/state": { + get: external["resources/uptime/get_check_state.yml"] + }; + "/v2/uptime/checks/{check_id}/alerts": { + get: external["resources/uptime/list_alerts.yml"] + post: external["resources/uptime/create_alert.yml"] + }; + "/v2/uptime/checks/{check_id}/alerts/{alert_id}": { + get: external["resources/uptime/get_alert.yml"] + put: external["resources/uptime/update_alert.yml"] + delete: external["resources/uptime/delete_alert.yml"] + }; +} + +export interface components { + schemas: never; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export interface external { + + "description.yml": { + + paths: Record; + components: Record; + } + "resources/1-clicks/models/oneClicks_create.yml": { + /** + * addon_slugs + * @description An array of 1-Click Application slugs to be installed to the Kubernetes cluster. + * @default [] + * @example [ + * "kube-state-metrics", + * "loki" + * ] + */ + addon_slugs: (string)[]; + /** + * cluster_uuid + * @description A unique ID for the Kubernetes cluster to which the 1-Click Applications will be installed. + * @example 50a994b6-c303-438f-9495-7e896cfe6b08 + */ + cluster_uuid: string; + } + "resources/1-clicks/models/oneClicks.yml": { + /** + * slug + * @description The slug identifier for the 1-Click application. + * @example monitoring + */ + slug: string; + /** + * type + * @description The type of the 1-Click application. + * @example kubernetes + */ + type: string; + } + "resources/1-clicks/oneClicks_install_kubernetes.yml": { + /** + * Install Kubernetes 1-Click Applications + * @description To install a Kubernetes 1-Click application on a cluster, send a POST request to + * `/v2/1-clicks/kubernetes`. The `addon_slugs` and `cluster_uuid` must be provided as body + * parameter in order to specify which 1-Click application(s) to install. To list all available + * 1-Click Kubernetes applications, send a request to `/v2/1-clicks?type=kubernetes`. + */ + requestBody: { + content: { + "application/json": external["resources/1-clicks/models/oneClicks_create.yml"]; + }; + }; + responses: { + 200: external["resources/1-clicks/responses/oneClicks_create.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/1-clicks/oneClicks_list.yml": { + /** + * List 1-Click Applications + * @description To list all available 1-Click applications, send a GET request to `/v2/1-clicks`. The `type` may + * be provided as query paramater in order to restrict results to a certain type of 1-Click, for + * example: `/v2/1-clicks?type=droplet`. Current supported types are `kubernetes` and `droplet`. + * + * The response will be a JSON object with a key called `1_clicks`. This will be set to an array of + * 1-Click application data, each of which will contain the the slug and type for the 1-Click. + */ + responses: { + 200: external["resources/1-clicks/responses/oneClicks_all.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/1-clicks/parameters.yml": string + "resources/1-clicks/responses/oneClicks_all.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + "1_clicks"?: (external["resources/1-clicks/models/oneClicks.yml"])[]; + }; + }; + } + "resources/1-clicks/responses/oneClicks_create.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + /** + * @description A message about the result of the request. + * @example Successfully kicked off addon job. + */ + message?: string; + }; + }; + } + "resources/account/account_get.yml": { + /** + * Get User Information + * @description To show information about the current user account, send a GET request to `/v2/account`. + */ + responses: { + 200: external["resources/account/responses/account.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/account/models/account.yml": { + /** + * @description The total number of Droplets current user or team may have active at one time. + * @example 25 + */ + droplet_limit: number; + /** + * @description The total number of Floating IPs the current user or team may have. + * @example 5 + */ + floating_ip_limit: number; + /** + * @description The email address used by the current user to register for DigitalOcean. + * @example sammy@digitalocean.com + */ + email: string; + /** + * @description The unique universal identifier for the current user. + * @example b6fr89dbf6d9156cace5f3c78dc9851d957381ef + */ + uuid: string; + /** + * @description If true, the user has verified their account via email. False otherwise. + * @default false + * @example true + */ + email_verified: boolean; + /** + * @description This value is one of "active", "warning" or "locked". + * @default active + * @example active + * @enum {string} + */ + status: "active" | "warning" | "locked"; + /** + * @description A human-readable message giving more details about the status of the account. + * @example + */ + status_message: string; + /** @description When authorized in a team context, includes information about the current team. */ + team?: { + /** + * @description The unique universal identifier for the current team. + * @example 5df3e3004a17e242b7c20ca6c9fc25b701a47ece + */ + uuid?: string; + /** + * @description The name for the current team. + * @example My Team + */ + name?: string; + }; + } + "resources/account/responses/account.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + account?: external["resources/account/models/account.yml"]; + }; + }; + } + "resources/actions/actions_get.yml": { + /** + * Retrieve an Existing Action + * @description To retrieve a specific action object, send a GET request to `/v2/actions/$ACTION_ID`. + */ + responses: { + 200: external["resources/actions/responses/action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/actions/actions_list.yml": { + /** + * List All Actions + * @description This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default. + */ + responses: { + 200: external["resources/actions/responses/actions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/actions/models/action.yml": { + /** + * @description A unique numeric ID that can be used to identify and reference an action. + * @example 36804636 + */ + id?: number; + /** + * @description The current status of the action. This can be "in-progress", "completed", or "errored". + * @default in-progress + * @example completed + * @enum {string} + */ + status?: "in-progress" | "completed" | "errored"; + /** + * @description This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. + * @example create + */ + type?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the action was initiated. + * @example "2020-11-14T16:29:21.000Z" + */ + started_at?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the action was completed. + * @example "2020-11-14T16:30:06.000Z" + */ + completed_at?: string; + /** + * @description A unique identifier for the resource that the action is associated with. + * @example 3164444 + */ + resource_id?: number; + /** + * @description The type of resource that the action is associated with. + * @example droplet + */ + resource_type?: string; + region?: external["resources/regions/models/region.yml"]; + region_slug?: external["resources/regions/models/region.yml"]["slug"] & string; + } + "resources/actions/parameters.yml": string + "resources/actions/responses/action.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + action?: external["resources/actions/models/action.yml"]; + }; + }; + } + "resources/actions/responses/actions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/apps/apps_assign_alertDestinations.yml": { + /** + * Update destinations for alerts + * @description Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app. + */ + requestBody: { + content: { + "application/json": external["resources/apps/models/apps_assign_app_alert_destinations_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/assign_alert_destinations.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_cancel_deployment.yml": { + /** + * Cancel a Deployment + * @description Immediately cancel an in-progress deployment. + */ + responses: { + 200: external["resources/apps/responses/cancel_deployment.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_commit_rollback.yml": { + /** + * Commit App Rollback + * @description Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments. + */ + responses: { + 200: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_create_deployment.yml": { + /** + * Create an App Deployment + * @description Creating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app. + */ + requestBody: { + content: { + "application/json": external["resources/apps/models/apps_create_deployment_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/new_app_deployment.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_create_rollback.yml": { + /** + * Rollback App + * @description Rollback an app to a previous deployment. A new deployment will be created to perform the rollback. + * The app will be pinned to the rollback deployment preventing any new deployments from being created, + * either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be + * either committed or reverted. + * + * It is recommended to use the Validate App Rollback endpoint to double check if the rollback is + * valid and if there are any warnings. + */ + requestBody: { + content: { + "application/json": external["resources/apps/models/apps_rollback_app_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/new_app_deployment.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_create.yml": { + /** + * Create a New App + * @description Create a new app by submitting an app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/). + */ + requestBody: { + content: { + /** + * @example { + * "spec": { + * "name": "web-app", + * "region": "nyc", + * "services": [ + * { + * "name": "api", + * "github": { + * "branch": "main", + * "deploy_on_push": true, + * "repo": "digitalocean/sample-golang" + * }, + * "run_command": "bin/api", + * "environment_slug": "node-js", + * "instance_count": 2, + * "instance_size_slug": "basic-xxs", + * "routes": [ + * { + * "path": "/api" + * } + * ] + * } + * ] + * } + * } + */ + "application/json": external["resources/apps/models/apps_create_app_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/new_app.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_delete.yml": { + /** + * Delete an App + * @description Delete an existing app. Once deleted, all active deployments will be permanently shut down and the app deleted. If needed, be sure to back up your app specification so that you may re-create it at a later time. + */ + responses: { + 200: external["resources/apps/responses/delete_app.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get_deployment.yml": { + /** + * Retrieve an App Deployment + * @description Retrieve information about an app deployment. + */ + responses: { + 200: external["resources/apps/responses/list_deployment.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get_instanceSize.yml": { + /** + * Retrieve an Instance Size + * @description Retrieve information about a specific instance size for `service`, `worker`, and `job` components. + */ + responses: { + 200: external["resources/apps/responses/get_instance.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get_logs.yml": { + /** + * Retrieve Deployment Logs + * @description Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. + */ + responses: { + 200: external["resources/apps/responses/list_logs.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get_logsAggregate.yml": { + /** + * Retrieve Aggregate Deployment Logs + * @description Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. + */ + responses: { + 200: external["resources/apps/responses/list_logs_aggregate.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get_tier.yml": { + /** + * Retrieve an App Tier + * @description Retrieve information about a specific app tier. + */ + responses: { + 200: external["resources/apps/responses/get_tier.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_get.yml": { + /** + * Retrieve an Existing App + * @description Retrieve details about an existing app by either its ID or name. To retrieve an app by its name, do not include an ID in the request path. Information about the current active deployment as well as any in progress ones will also be included in the response. + */ + responses: { + 200: external["resources/apps/responses/apps_get.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list_alerts.yml": { + /** + * List all app alerts + * @description List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions. + */ + responses: { + 200: external["resources/apps/responses/list_alerts.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list_deployments.yml": { + /** + * List App Deployments + * @description List all deployments of an app. + */ + responses: { + 200: external["resources/apps/responses/existing_deployments.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list_instanceSizes.yml": { + /** + * List Instance Sizes + * @description List all instance sizes for `service`, `worker`, and `job` components. + */ + responses: { + 200: external["resources/apps/responses/list_instance.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list_regions.yml": { + /** + * List App Regions + * @description List all regions supported by App Platform. + */ + responses: { + 200: external["resources/apps/responses/list_regions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list_tiers.yml": { + /** + * List App Tiers + * @description List all app tiers. + */ + responses: { + 200: external["resources/apps/responses/all_tiers.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_list.yml": { + /** + * List All Apps + * @description List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app. + */ + responses: { + 200: external["resources/apps/responses/list_apps.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_revert_rollback.yml": { + /** + * Revert App Rollback + * @description Revert an app rollback. This action reverts the active rollback by creating a new deployment from the + * latest app spec prior to the rollback and unpins the app to resume new deployments. + */ + responses: { + 200: external["resources/apps/responses/new_app_deployment.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_update.yml": { + /** + * Update an App + * @description Update an existing app by submitting a new app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/). + */ + requestBody: { + content: { + "application/json": external["resources/apps/models/apps_update_app_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/update_app.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_validate_appSpec.yml": { + /** + * Propose an App Spec + * @description To propose and validate a spec for a new or existing app, send a POST request to the `/v2/apps/propose` endpoint. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app. + */ + requestBody: { + content: { + /** + * @example { + * "spec": { + * "name": "web-app", + * "region": "nyc", + * "services": [ + * { + * "name": "api", + * "github": { + * "branch": "main", + * "deploy_on_push": true, + * "repo": "digitalocean/sample-golang" + * }, + * "run_command": "bin/api", + * "environment_slug": "node-js", + * "instance_count": 2, + * "instance_size_slug": "basic-xxs", + * "routes": [ + * { + * "path": "/api" + * } + * ] + * } + * ] + * }, + * "app_id": "b6bdf840-2854-4f87-a36c-5f231c617c84" + * } + */ + "application/json": external["resources/apps/models/app_propose.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/propose_app.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/apps_validate_rollback.yml": { + /** + * Validate App Rollback + * @description Check whether an app can be rolled back to a specific deployment. This endpoint can also be used + * to check if there are any warnings or validation conditions that will cause the rollback to proceed + * under unideal circumstances. For example, if a component must be rebuilt as part of the rollback + * causing it to take longer than usual. + */ + requestBody: { + content: { + "application/json": external["resources/apps/models/apps_rollback_app_request.yml"]; + }; + }; + responses: { + 200: external["resources/apps/responses/apps_validate_rollback.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/apps/models/app_alert_email.yml": string + "resources/apps/models/app_alert_phase.yml": "UNKNOWN" | "PENDING" | "CONFIGURING" | "ACTIVE" | "ERROR" + "resources/apps/models/app_alert_progress_step_reason.yml": { + /** + * The error code + * @example Title of Error + */ + code?: string; + /** + * The error message + * @example This is an error + */ + message?: string; + } + "resources/apps/models/app_alert_progress_step_status.yml": "UNKNOWN" | "PENDING" | "RUNNING" | "ERROR" | "SUCCESS" + "resources/apps/models/app_alert_progress_step.yml": { + /** + * The name of this step + * @example example_step + */ + name?: string; + status?: external["resources/apps/models/app_alert_progress_step_status.yml"]; + /** + * The start time of this step + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + started_at?: string; + /** + * The start time of this step + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + ended_at?: string; + reason?: external["resources/apps/models/app_alert_progress_step_reason.yml"]; + } + "resources/apps/models/app_alert_progress.yml": { + /** Steps of an alert's progress. */ + steps?: (external["resources/apps/models/app_alert_progress_step.yml"])[]; + } + "resources/apps/models/app_alert_slack_webhook.yml": { + /** + * URL of the Slack webhook + * @example https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX + */ + url?: string; + /** + * Name of the Slack Webhook Channel + * @example Channel Name + */ + channel?: string; + } + "resources/apps/models/app_alert_spec_operator.yml": "UNSPECIFIED_OPERATOR" | "GREATER_THAN" | "LESS_THAN" + "resources/apps/models/app_alert_spec_rule.yml": "UNSPECIFIED_RULE" | "CPU_UTILIZATION" | "MEM_UTILIZATION" | "RESTART_COUNT" | "DEPLOYMENT_FAILED" | "DEPLOYMENT_LIVE" | "DOMAIN_FAILED" | "DOMAIN_LIVE" | "FUNCTIONS_ACTIVATION_COUNT" | "FUNCTIONS_AVERAGE_DURATION_MS" | "FUNCTIONS_ERROR_RATE_PER_MINUTE" | "FUNCTIONS_AVERAGE_WAIT_TIME_MS" | "FUNCTIONS_ERROR_COUNT" | "FUNCTIONS_GB_RATE_PER_SECOND" + "resources/apps/models/app_alert_spec_window.yml": "UNSPECIFIED_WINDOW" | "FIVE_MINUTES" | "TEN_MINUTES" | "THIRTY_MINUTES" | "ONE_HOUR" + "resources/apps/models/app_alert_spec.yml": { + rule?: external["resources/apps/models/app_alert_spec_rule.yml"]; + /** + * @description Is the alert disabled? + * @example false + */ + disabled?: boolean; + operator?: external["resources/apps/models/app_alert_spec_operator.yml"]; + /** + * Format: float + * @description Threshold value for alert + * @example 2.32 + */ + value?: number; + window?: external["resources/apps/models/app_alert_spec_window.yml"]; + } + "resources/apps/models/app_alert.yml": { + /** + * The ID of the alert + * @example 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf + */ + id?: string; + /** + * Name of component the alert belongs to + * @example backend + */ + component_name?: string; + spec?: external["resources/apps/models/app_alert_spec.yml"]; + /** + * Emails for alerts to go to + * @example [ + * "sammy@digitalocean.com" + * ] + */ + emails?: (external["resources/apps/models/app_alert_email.yml"])[]; + /** Slack Webhooks to send alerts to */ + slack_webhooks?: (external["resources/apps/models/app_alert_slack_webhook.yml"])[]; + phase?: external["resources/apps/models/app_alert_phase.yml"]; + progress?: external["resources/apps/models/app_alert_progress.yml"]; + } + "resources/apps/models/app_component_base.yml": { + /** + * @description The name. Must be unique across all components within the same app. + * @example api + */ + name?: string; + git?: external["resources/apps/models/apps_git_source_spec.yml"]; + github?: external["resources/apps/models/apps_github_source_spec.yml"]; + gitlab?: external["resources/apps/models/apps_gitlab_source_spec.yml"]; + image?: external["resources/apps/models/apps_image_source_spec.yml"]; + /** + * @description The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. + * @example path/to/Dockerfile + */ + dockerfile_path?: string; + /** + * @description An optional build command to run while building this component from source. + * @example npm run build + */ + build_command?: string; + /** + * @description An optional run command to override the component's default. + * @example bin/api + */ + run_command?: string; + /** + * @description An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. + * @example path/to/dir + */ + source_dir?: string; + /** @description A list of environment variables made available to the component. */ + envs?: (external["resources/apps/models/app_variable_definition.yml"])[]; + /** + * @description An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/). + * @example node-js + */ + environment_slug?: string; + log_destinations?: external["resources/apps/models/app_log_destination_definition.yml"]; + } + "resources/apps/models/app_component_instance_base.yml": { + /** + * Format: int64 + * @description The amount of instances that this component should be scaled to. Default: 1 + * @default 1 + * @example 2 + */ + instance_count?: number; + /** + * @description The instance size to use for this component. Default: `basic-xxs` + * @default basic-xxs + * @example basic-xxs + * @enum {string} + */ + instance_size_slug?: "basic-xxs" | "basic-xs" | "basic-s" | "basic-m" | "professional-xs" | "professional-s" | "professional-m" | "professional-1l" | "professional-l" | "professional-xl"; + } + "resources/apps/models/app_database_spec.yml": { + /** + * @description The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. + * @example cluster_name + */ + cluster_name?: string; + /** + * @description The name of the MySQL or PostgreSQL database to configure. + * @example my_db + */ + db_name?: string; + /** + * @description The name of the MySQL or PostgreSQL user to configure. + * @example superuser + */ + db_user?: string; + /** + * @description - MYSQL: MySQL + * - PG: PostgreSQL + * - REDIS: Redis + * @default UNSET + * @example PG + * @enum {string} + */ + engine?: "UNSET" | "MYSQL" | "PG" | "REDIS"; + /** + * @description The name. Must be unique across all components within the same app. + * @example prod-db + */ + name: string; + /** + * @description Whether this is a production or dev database. + * @example true + */ + production?: boolean; + /** + * @description The version of the database engine + * @example 12 + */ + version?: string; + } + "resources/apps/models/app_domain_spec.yml": { + /** + * @description The hostname for the domain + * @example app.example.com + */ + domain: string; + /** + * @description - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app + * - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. + * - ALIAS: A non-primary domain + * @default UNSPECIFIED + * @example DEFAULT + * @enum {string} + */ + type?: "UNSPECIFIED" | "DEFAULT" | "PRIMARY" | "ALIAS"; + /** + * @description Indicates whether the domain includes all sub-domains, in addition to the given domain + * @example true + */ + wildcard?: boolean; + /** + * Format: hostname + * @description Optional. If the domain uses DigitalOcean DNS and you would like App + * Platform to automatically manage it for you, set this to the name of the + * domain on your account. + * + * For example, If the domain you are adding is `app.domain.com`, the zone + * could be `domain.com`. + * @example example.com + */ + zone?: string; + /** + * @description The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. + * @example 1.3 + * @enum {string} + */ + minimum_tls_version?: "1.2" | "1.3"; + } + "resources/apps/models/app_functions_spec.yml": { + cors?: external["resources/apps/models/apps_cors_policy.yml"]; + /** @description A list of HTTP routes that should be routed to this component. */ + routes?: (external["resources/apps/models/app_route_spec.yml"])[]; + /** + * @description The name. Must be unique across all components within the same app. + * @example api + */ + name: string; + /** + * @description An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. + * @example path/to/dir + */ + source_dir?: string; + alerts?: (external["resources/apps/models/app_alert_spec.yml"])[]; + /** @description A list of environment variables made available to the component. */ + envs?: (external["resources/apps/models/app_variable_definition.yml"])[]; + git?: external["resources/apps/models/apps_git_source_spec.yml"]; + github?: external["resources/apps/models/apps_github_source_spec.yml"]; + gitlab?: external["resources/apps/models/apps_gitlab_source_spec.yml"]; + log_destinations?: external["resources/apps/models/app_log_destination_definition.yml"]; + } + "resources/apps/models/app_job_spec.yml": external["resources/apps/models/app_component_base.yml"] & external["resources/apps/models/app_component_instance_base.yml"] & ({ + /** + * @description - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. + * - PRE_DEPLOY: Indicates a job that runs before an app deployment. + * - POST_DEPLOY: Indicates a job that runs after an app deployment. + * - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. + * @default UNSPECIFIED + * @example PRE_DEPLOY + * @enum {string} + */ + kind?: "UNSPECIFIED" | "PRE_DEPLOY" | "POST_DEPLOY" | "FAILED_DEPLOY"; + }) + "resources/apps/models/app_log_destination_datadog_spec.yml": { + /** + * @description Datadog HTTP log intake endpoint. + * @example https://mydatadogendpoint.com + */ + endpoint?: string; + /** + * @description Datadog API key. + * @example abcdefghijklmnopqrstuvwxyz0123456789 + */ + api_key: string; + } + "resources/apps/models/app_log_destination_definition.yml": { + /** @example my_log_destination */ + name: string; + papertrail?: external["resources/apps/models/app_log_destination_papertrail_spec.yml"]; + datadog?: external["resources/apps/models/app_log_destination_datadog_spec.yml"]; + logtail?: external["resources/apps/models/app_log_destination_logtail_spec.yml"]; + } + "resources/apps/models/app_log_destination_logtail_spec.yml": { + /** + * @description Logtail token. + * @example abcdefghijklmnopqrstuvwxyz0123456789 + */ + token?: string; + } + "resources/apps/models/app_log_destination_papertrail_spec.yml": { + /** + * @description Papertrail syslog endpoint. + * @example https://mypapertrailendpoint.com + */ + endpoint: string; + } + "resources/apps/models/app_propose_response.yml": { + /** + * @description Indicates whether the app is a static app. + * @example true + */ + app_is_static?: boolean; + /** + * @description Indicates whether the app name is available. + * @example true + */ + app_name_available?: boolean; + /** + * @description The suggested name if the proposed app name is unavailable. + * @example newName + */ + app_name_suggestion?: string; + /** + * @description The maximum number of free static apps the account can have. We will charge you for any additional static apps. + * @example 2 + */ + existing_static_apps?: string; + spec?: external["resources/apps/models/app_spec.yml"]; + /** + * Format: int32 + * @description The monthly cost of the proposed app in USD using the next pricing plan tier. For example, if you propose an app that uses the Basic tier, the `app_tier_upgrade_cost` field displays the monthly cost of the app if it were to use the Professional tier. If the proposed app already uses the most expensive tier, the field is empty. + * @example 5 + */ + app_cost?: number; + /** + * Format: int32 + * @description The monthly cost of the proposed app in USD using the previous pricing plan tier. For example, if you propose an app that uses the Professional tier, the `app_tier_downgrade_cost` field displays the monthly cost of the app if it were to use the Basic tier. If the proposed app already uses the lest expensive tier, the field is empty. + * @example 17 + */ + app_tier_downgrade_cost?: number; + } + "resources/apps/models/app_propose.yml": { + spec: external["resources/apps/models/app_spec.yml"]; + /** + * @description An optional ID of an existing app. If set, the spec will be treated as a proposed update to the specified app. The existing app is not modified using this method. + * @example b6bdf840-2854-4f87-a36c-5f231c617c84 + */ + app_id?: string; + } + "resources/apps/models/app_response.yml": { + app?: external["resources/apps/models/app.yml"]; + } + "resources/apps/models/app_rollback_validation_condition.yml": { + /** + * @description A code identifier that represents the failing condition. + * + * Failing conditions: + * - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback. + * - `incompatible_result` - indicates that the deployment's result is not suitable for rollback. + * - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier. + * - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned. + * - `database_config_conflict` - indicates that the deployment's database config is different than the current config. + * - `region_conflict` - indicates that the deployment's region differs from the current app region. + * + * Warning conditions: + * - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild. + * - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest. + * + * @example exceeded_revision_limit + * @enum {string} + */ + code?: "incompatible_phase" | "incompatible_result" | "exceeded_revision_limit" | "app_pinned" | "database_config_conflict" | "region_conflict" | "static_site_requires_rebuild" | "image_source_missing_digest"; + /** + * @description A human-readable message describing the failing condition. + * @example the deployment is past the maximum historical revision limit of 0 for the "starter" app tier + */ + message?: string; + /** + * @example [ + * "www" + * ] + */ + components?: (string)[]; + } + "resources/apps/models/app_route_spec.yml": { + /** + * @description An HTTP path prefix. Paths must start with / and must be unique across all components within an app. + * @example /api + */ + path?: string; + /** + * @description An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. + * @example true + */ + preserve_path_prefix?: boolean; + } + "resources/apps/models/app_service_spec_health_check.yml": { + /** + * Format: int32 + * @description The number of failed health checks before considered unhealthy. + * @example 2 + */ + failure_threshold?: number; + /** + * Format: int64 + * @description The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port. + * @example 80 + */ + port?: number; + /** + * @description The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. + * @example /health + */ + http_path?: string; + /** + * Format: int32 + * @description The number of seconds to wait before beginning health checks. + * @example 30 + */ + initial_delay_seconds?: number; + /** + * Format: int32 + * @description The number of seconds to wait between health checks. + * @example 60 + */ + period_seconds?: number; + /** + * Format: int32 + * @description The number of successful health checks before considered healthy. + * @example 3 + */ + success_threshold?: number; + /** + * Format: int32 + * @description The number of seconds after which the check times out. + * @example 45 + */ + timeout_seconds?: number; + } + "resources/apps/models/app_service_spec.yml": external["resources/apps/models/app_component_base.yml"] & external["resources/apps/models/app_component_instance_base.yml"] & { + cors?: external["resources/apps/models/apps_cors_policy.yml"]; + health_check?: external["resources/apps/models/app_service_spec_health_check.yml"]; + /** + * Format: int64 + * @description The internal port on which this service's run command will listen. Default: 8080 + * If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. + * @example 3000 + */ + http_port?: number; + /** + * @description The ports on which this service will listen for internal traffic. + * @example [ + * 80, + * 443 + * ] + */ + internal_ports?: (number)[]; + /** @description A list of HTTP routes that should be routed to this component. */ + routes?: (external["resources/apps/models/app_route_spec.yml"])[]; + } + "resources/apps/models/app_spec.yml": { + /** + * @description The name of the app. Must be unique across all apps in the same account. + * @example web-app-01 + */ + name: string; + /** + * @description The slug form of the geographical origin of the app. Default: `nearest available` + * @example nyc + * @enum {string} + */ + region?: "ams" | "nyc" | "fra"; + /** @description A set of hostnames where the application will be available. */ + domains?: (external["resources/apps/models/app_domain_spec.yml"])[]; + /** @description Workloads which expose publicly-accessible HTTP services. */ + services?: (external["resources/apps/models/app_service_spec.yml"])[]; + /** @description Content which can be rendered to static web assets. */ + static_sites?: (external["resources/apps/models/app_static_site_spec.yml"])[]; + /** @description Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. */ + jobs?: (external["resources/apps/models/app_job_spec.yml"])[]; + /** @description Workloads which do not expose publicly-accessible HTTP services. */ + workers?: (external["resources/apps/models/app_worker_spec.yml"])[]; + /** @description Workloads which expose publicly-accessible HTTP services via Functions Components. */ + functions?: (external["resources/apps/models/app_functions_spec.yml"])[]; + /** + * @description Database instances which can provide persistence to workloads within the + * application. + */ + databases?: (external["resources/apps/models/app_database_spec.yml"])[]; + } + "resources/apps/models/app_static_site_spec.yml": external["resources/apps/models/app_component_base.yml"] & { + /** + * @description The name of the index document to use when serving this static site. Default: index.html + * @default index.html + * @example main.html + */ + index_document?: string; + /** + * @description The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. + * @default 404.html + * @example error.html + */ + error_document?: string; + /** + * @description The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. + * @example index.html + */ + catchall_document?: string; + /** + * @description An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. + * @example dist/ + */ + output_dir?: string; + cors?: external["resources/apps/models/apps_cors_policy.yml"]; + /** @description A list of HTTP routes that should be routed to this component. */ + routes?: (external["resources/apps/models/app_route_spec.yml"])[]; + } + "resources/apps/models/app_variable_definition.yml": { + /** + * @description The variable name + * @example BASE_URL + */ + key: string; + /** + * @description - RUN_TIME: Made available only at run-time + * - BUILD_TIME: Made available only at build-time + * - RUN_AND_BUILD_TIME: Made available at both build and run-time + * @default RUN_AND_BUILD_TIME + * @example BUILD_TIME + * @enum {string} + */ + scope?: "UNSET" | "RUN_TIME" | "BUILD_TIME" | "RUN_AND_BUILD_TIME"; + /** + * @description - GENERAL: A plain-text environment variable + * - SECRET: A secret encrypted environment variable + * @default GENERAL + * @example GENERAL + * @enum {string} + */ + type?: "GENERAL" | "SECRET"; + /** + * @description The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. + * @example http://example.com + */ + value?: string; + } + "resources/apps/models/app_worker_spec.yml": external["resources/apps/models/app_component_base.yml"] & external["resources/apps/models/app_component_instance_base.yml"] + "resources/apps/models/app.yml": { + active_deployment?: external["resources/apps/models/apps_deployment.yml"]; + /** + * The creation time of the app + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + created_at?: string; + /** + * The default hostname on which the app is accessible + * @example digitalocean.com + */ + default_ingress?: string; + /** Contains all domains for the app */ + domains?: readonly (external["resources/apps/models/apps_domain.yml"])[]; + /** + * The ID of the application + * @example 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf + */ + id?: string; + in_progress_deployment?: external["resources/apps/models/apps_deployment.yml"]; + /** + * The creation time of the last deployment + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + last_deployment_created_at?: string; + /** + * The live domain of the app + * @example live_domain + */ + live_domain?: string; + /** + * The live URL of the app + * @example google.com + */ + live_url?: string; + /** + * The live URL base of the app, the URL excluding the path + * @example digitalocean.com + */ + live_url_base?: string; + /** + * The ID of the account to which the application belongs + * @example 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf + */ + owner_uuid?: string; + /** + * The ID of the project the app is assigned to. This will be empty if there is a lookup failure. + * @example 88b72d1a-b78a-4d9f-9090-b53c4399073f + */ + project_id?: string; + region?: external["resources/apps/models/apps_region.yml"]; + spec: external["resources/apps/models/app_spec.yml"]; + /** + * The current pricing tier slug of the app + * @example basic + */ + tier_slug?: string; + /** + * Time of the app's last configuration update + * Format: date-time + * @example "2020-12-01T00:42:16.000Z" + */ + updated_at?: string; + pinned_deployment?: Record & external["resources/apps/models/apps_deployment.yml"]; + } + "resources/apps/models/apps_alert_response.yml": { + alert?: external["resources/apps/models/app_alert.yml"]; + } + "resources/apps/models/apps_assign_app_alert_destinations_request.yml": { + /** + * @example [ + * "sammy@digitalocean.com" + * ] + */ + emails?: (external["resources/apps/models/app_alert_email.yml"])[]; + slack_webhooks?: (external["resources/apps/models/app_alert_slack_webhook.yml"])[]; + } + "resources/apps/models/apps_cors_policy.yml": { + /** + * @description The set of allowed CORS origins. + * @example [ + * { + * "exact": "https://www.example.com" + * }, + * { + * "regex": "^.*example.com" + * } + * ] + */ + allow_origins?: (external["resources/apps/models/apps_string_match.yml"])[]; + /** + * @description The set of allowed HTTP methods. This configures the `Access-Control-Allow-Methods` header. + * @example [ + * "GET", + * "OPTIONS", + * "POST", + * "PUT", + * "PATCH", + * "DELETE" + * ] + */ + allow_methods?: (string)[]; + /** + * @description The set of allowed HTTP request headers. This configures the `Access-Control-Allow-Headers` header. + * @example [ + * "Content-Type", + * "X-Custom-Header" + * ] + */ + allow_headers?: (string)[]; + /** + * @description The set of HTTP response headers that browsers are allowed to access. This configures the `Access-Control-Expose-Headers` header. + * @example [ + * "Content-Encoding", + * "X-Custom-Header" + * ] + */ + expose_headers?: (string)[]; + /** + * @description An optional duration specifying how long browsers can cache the results of a preflight request. This configures the `Access-Control-Max-Age` header. + * @example 5h30m + */ + max_age?: string; + /** + * @description Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is include. This configures the `Access-Control-Allow-Credentials` header. + * @example false + */ + allow_credentials?: boolean; + } + "resources/apps/models/apps_create_app_request.yml": { + spec: external["resources/apps/models/app_spec.yml"]; + /** @description The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. */ + project_id?: string; + } + "resources/apps/models/apps_create_deployment_request.yml": { + /** + * Indicates whether to force a build of app from source even if an existing cached build is suitable for re-use + * @example true + */ + force_build?: boolean; + } + "resources/apps/models/apps_delete_app_response.yml": { + /** + * The ID of the app that was deleted + * @example 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf + */ + id?: string; + } + "resources/apps/models/apps_deployment_functions.yml": { + /** + * The name of this functions component + * @example my-functions-component + */ + name?: string; + /** + * @description The commit hash of the repository that was used to build this functions component. + * @example 54d4a727f457231062439895000d45437c7bb405 + */ + source_commit_hash?: string; + /** + * @description The namespace where the functions are deployed. + * @example ap-b2a93513-8d9b-4223-9d61-5e7272c81c32 + */ + namespace?: string; + } + "resources/apps/models/apps_deployment_job.yml": { + /** + * The name of this job + * @example migrate-db + */ + name?: string; + /** + * The commit hash of the repository that was used to build this job + * @example 54d4a727f457231062439895000d45437c7bb405 + */ + source_commit_hash?: string; + } + "resources/apps/models/apps_deployment_phase.yml": "UNKNOWN" | "PENDING_BUILD" | "BUILDING" | "PENDING_DEPLOY" | "DEPLOYING" | "ACTIVE" | "SUPERSEDED" | "ERROR" | "CANCELED" + "resources/apps/models/apps_deployment_progress_step_reason.yml": { + /** + * The error code + * @example Title of Error + */ + code?: string; + /** + * The error message + * @example This is an error + */ + message?: string; + } + "resources/apps/models/apps_deployment_progress_step_status.yml": "UNKNOWN" | "PENDING" | "RUNNING" | "ERROR" | "SUCCESS" + "resources/apps/models/apps_deployment_progress_step.yml": { + /** + * The component name that this step is associated with + * @example component + */ + component_name?: string; + /** + * The end time of this step + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + ended_at?: string; + /** + * @description The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: + * + * `message_base` = "Building service" + * `component_name` = "api" + * @example Building service + */ + message_base?: string; + /** + * The name of this step + * @example example_step + */ + name?: string; + reason?: external["resources/apps/models/apps_deployment_progress_step_reason.yml"]; + /** + * The start time of this step + * Format: date-time + * @example "2020-11-19T20:27:18.000Z" + */ + started_at?: string; + status?: external["resources/apps/models/apps_deployment_progress_step_status.yml"]; + /** Child steps of this step */ + steps?: (Record)[]; + } + "resources/apps/models/apps_deployment_progress.yml": { + /** + * Number of unsuccessful steps + * Format: int32 + * @example 3 + */ + error_steps?: number; + /** + * Number of pending steps + * Format: int32 + * @example 2 + */ + pending_steps?: number; + /** + * Number of currently running steps + * Format: int32 + * @example 2 + */ + running_steps?: number; + /** The deployment's steps */ + steps?: (external["resources/apps/models/apps_deployment_progress_step.yml"])[]; + /** + * Number of successful steps + * Format: int32 + * @example 4 + */ + success_steps?: number; + /** A flattened summary of the steps */ + summary_steps?: (external["resources/apps/models/apps_deployment_progress_step.yml"])[]; + /** + * Total number of steps + * Format: int32 + * @example 5 + */ + total_steps?: number; + } + "resources/apps/models/apps_deployment_response.yml": { + deployment?: external["resources/apps/models/apps_deployment.yml"]; + } + "resources/apps/models/apps_deployment_service.yml": { + /** + * The name of this service + * @example web + */ + name?: string; + /** + * The commit hash of the repository that was used to build this service + * @example 54d4a727f457231062439895000d45437c7bb405 + */ + source_commit_hash?: string; + } + "resources/apps/models/apps_deployment_static_site.yml": { + /** + * The name of this static site + * @example web + */ + name?: string; + /** + * The commit hash of the repository that was used to build this static site + * @example 54d4a727f457231062439895000d45437c7bb405 + */ + source_commit_hash?: string; + } + "resources/apps/models/apps_deployment_worker.yml": { + /** + * The name of this worker + * @example queue-runner + */ + name?: string; + /** + * The commit hash of the repository that was used to build this worker + * @example 54d4a727f457231062439895000d45437c7bb405 + */ + source_commit_hash?: string; + } + "resources/apps/models/apps_deployment.yml": { + /** + * What caused this deployment to be created + * @example commit 9a4df0b pushed to github/digitalocean/sample-golang + */ + cause?: string; + /** + * The ID of a previous deployment that this deployment was cloned from + * @example 3aa4d20e-5527-4c00-b496-601fbd22520a + */ + cloned_from?: string; + /** + * The creation time of the deployment + * Format: date-time + * @example "2020-07-28T18:00:00.000Z" + */ + created_at?: string; + /** + * The ID of the deployment + * @example b6bdf840-2854-4f87-a36c-5f231c617c84 + */ + id?: string; + /** Job components that are part of this deployment */ + jobs?: (external["resources/apps/models/apps_deployment_job.yml"])[]; + /** Functions components that are part of this deployment */ + functions?: (external["resources/apps/models/apps_deployment_functions.yml"])[]; + phase?: external["resources/apps/models/apps_deployment_phase.yml"]; + /** + * When the deployment phase was last updated + * Format: date-time + * @example "1901-01-01T00:00:00.000Z" + */ + phase_last_updated_at?: string; + progress?: external["resources/apps/models/apps_deployment_progress.yml"]; + /** Service components that are part of this deployment */ + services?: (external["resources/apps/models/apps_deployment_service.yml"])[]; + spec?: external["resources/apps/models/app_spec.yml"]; + /** Static Site components that are part of this deployment */ + static_sites?: (external["resources/apps/models/apps_deployment_static_site.yml"])[]; + /** + * The current pricing tier slug of the deployment + * @example basic + */ + tier_slug?: string; + /** + * When the deployment was last updated + * Format: date-time + * @example "2020-07-28T18:00:00.000Z" + */ + updated_at?: string; + /** Worker components that are part of this deployment */ + workers?: (external["resources/apps/models/apps_deployment_worker.yml"])[]; + } + "resources/apps/models/apps_deployments_response.yml": { + /** A list of deployments */ + deployments?: (external["resources/apps/models/apps_deployment.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"] + "resources/apps/models/apps_domain_phase.yml": "UNKNOWN" | "PENDING" | "CONFIGURING" | "ACTIVE" | "ERROR" + "resources/apps/models/apps_domain_progress.yml": { + /** The steps of the domain's progress */ + steps?: (Record)[]; + } + "resources/apps/models/apps_domain.yml": { + /** + * The ID of the domain + * @example 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf + */ + id?: string; + phase?: external["resources/apps/models/apps_domain_phase.yml"]; + progress?: external["resources/apps/models/apps_domain_progress.yml"]; + spec?: external["resources/apps/models/app_domain_spec.yml"]; + } + "resources/apps/models/apps_get_instance_size_response.yml": { + instance_size?: external["resources/apps/models/apps_instance_size.yml"]; + } + "resources/apps/models/apps_get_logs_response.yml": { + /** A list of URLs to archived log files */ + historic_urls?: (string)[]; + /** + * @description A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. + * @example ws://logs/build + */ + live_url?: string; + } + "resources/apps/models/apps_get_tier_response.yml": { + tier?: external["resources/apps/models/apps_tier.yml"]; + } + "resources/apps/models/apps_git_source_spec.yml": { + /** + * @description The name of the branch to use + * @example main + */ + branch?: string; + /** + * @description The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` + * @example https://github.com/digitalocean/sample-golang.git + */ + repo_clone_url?: string; + } + "resources/apps/models/apps_github_source_spec.yml": { + /** + * @description The name of the branch to use + * @example main + */ + branch?: string; + /** + * @description Whether to automatically deploy new commits made to the repo + * @example true + */ + deploy_on_push?: boolean; + /** + * @description The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` + * @example digitalocean/sample-golang + */ + repo?: string; + } + "resources/apps/models/apps_gitlab_source_spec.yml": { + /** + * @description The name of the branch to use + * @example main + */ + branch?: string; + /** + * @description Whether to automatically deploy new commits made to the repo + * @example true + */ + deploy_on_push?: boolean; + /** + * @description The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` + * @example digitalocean/sample-golang + */ + repo?: string; + } + "resources/apps/models/apps_image_source_spec.yml": { + /** + * @description The registry name. Must be left empty for the `DOCR` registry type. + * @example registry.hub.docker.com + */ + registry?: string; + /** + * @description - DOCKER_HUB: The DockerHub container registry type. + * - DOCR: The DigitalOcean container registry type. + * @example DOCR + * @enum {string} + */ + registry_type?: "DOCKER_HUB" | "DOCR"; + /** + * @description The repository name. + * @example origin/master + */ + repository?: string; + /** + * @description The repository tag. Defaults to `latest` if not provided. + * @default latest + * @example latest + */ + tag?: string; + } + "resources/apps/models/apps_instance_size.yml": { + cpu_type?: external["resources/apps/models/instance_size_cpu_type.yml"]; + /** + * The number of allotted vCPU cores + * Format: int64 + * @example 3 + */ + cpus?: string; + /** + * The allotted memory in bytes + * Format: int64 + * @example 1048 + */ + memory_bytes?: string; + /** + * A human-readable name of the instance size + * @example name + */ + name?: string; + /** + * The slug of the instance size + * @example basic + */ + slug?: string; + /** + * The slug of the corresponding downgradable instance size on the lower tier + * @example basic + */ + tier_downgrade_to?: string; + /** + * The slug of the tier to which this instance size belongs + * @example basic + */ + tier_slug?: string; + /** + * The slug of the corresponding upgradable instance size on the higher tier + * @example basic + */ + tier_upgrade_to?: string; + /** + * The cost of this instance size in USD per month + * @example 23 + */ + usd_per_month?: string; + /** + * The cost of this instance size in USD per second + * @example 0.00000001232 + */ + usd_per_second?: string; + } + "resources/apps/models/apps_list_alerts_response.yml": { + alerts?: (external["resources/apps/models/app_alert.yml"])[]; + } + "resources/apps/models/apps_list_instance_sizes_response.yml": { + /** + * Format: float + * @example 2.32 + */ + discount_percent?: number; + instance_sizes?: (external["resources/apps/models/apps_instance_size.yml"])[]; + } + "resources/apps/models/apps_list_regions_response.yml": { + regions?: (external["resources/apps/models/apps_region.yml"])[]; + } + "resources/apps/models/apps_list_tiers_response.yml": { + tiers?: (external["resources/apps/models/apps_tier.yml"])[]; + } + "resources/apps/models/apps_region.yml": { + /** + * The continent that this region is in + * @example europe + */ + continent?: string; + /** + * Data centers that are in this region + * @example [ + * "ams" + * ] + */ + data_centers?: readonly (string)[]; + /** + * @description Whether or not the region is presented as the default. + * @example true + */ + default?: boolean; + /** + * Whether or not the region is open for new apps + * @example true + */ + disabled?: boolean; + /** + * The flag of this region + * @example ams + */ + flag?: string; + /** + * A human-readable name of the region + * @example ams + */ + label?: string; + /** + * Reason that this region is not available + * @example to crowded + */ + reason?: string; + /** + * The slug form of the region name + * @example basic + */ + slug?: string; + } + "resources/apps/models/apps_response.yml": { + /** A list of apps */ + apps?: (external["resources/apps/models/app.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"] + "resources/apps/models/apps_rollback_app_request.yml": { + /** + * @description The ID of the deployment to rollback to. + * @example 3aa4d20e-5527-4c00-b496-601fbd22520a + */ + deployment_id?: string; + /** + * @description Whether to skip pinning the rollback deployment. If false, the rollback deployment will be pinned and any new deployments including Auto Deploy on Push hooks will be disabled until the rollback is either manually committed or reverted via the CommitAppRollback or RevertAppRollback endpoints respectively. If true, the rollback will be immediately committed and the app will remain unpinned. + * @example false + */ + skip_pin?: boolean; + } + "resources/apps/models/apps_string_match.yml": { + /** + * @description Exact string match. Only 1 of `exact`, `prefix`, or `regex` must be set. + * @example https://www.example.com + */ + exact?: string; + /** + * @description Prefix-based match. Only 1 of `exact`, `prefix`, or `regex` must be set. + * @example https://www.example.com + */ + prefix?: string; + /** + * @description RE2 style regex-based match. Only 1 of `exact`, `prefix`, or `regex` must be set. For more information about RE2 syntax, see: https://github.com/google/re2/wiki/Syntax + * @example ^.*example.com + */ + regex?: string; + } + "resources/apps/models/apps_tier.yml": { + /** + * The amount of included build time in seconds + * Format: int64 + * @example 233 + */ + build_seconds?: string; + /** + * The amount of included outbound bandwidth in bytes + * Format: int64 + * @example 123 + */ + egress_bandwidth_bytes?: string; + /** + * A human-readable name of the tier + * @example test + */ + name?: string; + /** + * The slug of the tier + * @example test + */ + slug?: string; + /** + * The allotted disk space in bytes + * Format: int64 + * @example 10000000 + */ + storage_bytes?: string; + } + "resources/apps/models/apps_update_app_request.yml": { + spec: external["resources/apps/models/app_spec.yml"]; + } + "resources/apps/models/instance_size_cpu_type.yml": "UNSPECIFIED" | "SHARED" | "DEDICATED" + "resources/apps/parameters.yml": string + "resources/apps/responses/all_tiers.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_list_tiers_response.yml"]; + }; + } + "resources/apps/responses/apps_get.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/app_response.yml"]; + }; + } + "resources/apps/responses/apps_validate_rollback.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + /** @description Indicates whether the app can be rolled back to the specified deployment. */ + valid?: boolean; + error?: Record & external["resources/apps/models/app_rollback_validation_condition.yml"]; + /** @description Contains a list of warnings that may cause the rollback to run under unideal circumstances. */ + warnings?: (external["resources/apps/models/app_rollback_validation_condition.yml"])[]; + }; + }; + } + "resources/apps/responses/assign_alert_destinations.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_alert_response.yml"]; + }; + } + "resources/apps/responses/cancel_deployment.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_deployment_response.yml"]; + }; + } + "resources/apps/responses/delete_app.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_delete_app_response.yml"]; + }; + } + "resources/apps/responses/examples.yml": unknown + "resources/apps/responses/existing_deployments.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_deployments_response.yml"]; + }; + } + "resources/apps/responses/get_instance.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_get_instance_size_response.yml"]; + }; + } + "resources/apps/responses/get_tier.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_get_tier_response.yml"]; + }; + } + "resources/apps/responses/list_alerts.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_list_alerts_response.yml"]; + }; + } + "resources/apps/responses/list_apps.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_response.yml"]; + }; + } + "resources/apps/responses/list_deployment.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_deployment_response.yml"]; + }; + } + "resources/apps/responses/list_instance.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_list_instance_sizes_response.yml"]; + }; + } + "resources/apps/responses/list_logs_aggregate.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_get_logs_response.yml"]; + }; + } + "resources/apps/responses/list_logs.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_get_logs_response.yml"]; + }; + } + "resources/apps/responses/list_regions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_list_regions_response.yml"]; + }; + } + "resources/apps/responses/new_app_deployment.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/apps_deployment_response.yml"]; + }; + } + "resources/apps/responses/new_app.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/app_response.yml"]; + }; + } + "resources/apps/responses/propose_app.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/app_propose_response.yml"]; + }; + } + "resources/apps/responses/update_app.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/apps/models/app_response.yml"]; + }; + } + "resources/billing/balance_get.yml": { + /** + * Get Customer Balance + * @description To retrieve the balances on a customer's account, send a GET request to `/v2/customers/my/balance`. + */ + responses: { + 200: external["resources/billing/responses/balance.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/billingHistory_list.yml": { + /** + * List Billing History + * @description To retrieve a list of all billing history entries, send a GET request to `/v2/customers/my/billing_history`. + */ + responses: { + 200: external["resources/billing/responses/billing_history.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/invoices_get_byUUID.yml": { + /** + * Retrieve an Invoice by UUID + * @description To retrieve the invoice items for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID`. + */ + responses: { + 200: external["resources/billing/responses/invoice.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/invoices_get_csvByUUID.yml": { + /** + * Retrieve an Invoice CSV by UUID + * @description To retrieve a CSV for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/csv`. + */ + responses: { + 200: external["resources/billing/responses/invoice_csv.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/invoices_get_pdfByUUID.yml": { + /** + * Retrieve an Invoice PDF by UUID + * @description To retrieve a PDF for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/pdf`. + */ + responses: { + 200: external["resources/billing/responses/invoice_pdf.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/invoices_get_summaryByUUID.yml": { + /** + * Retrieve an Invoice Summary by UUID + * @description To retrieve a summary for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/summary`. + */ + responses: { + 200: external["resources/billing/responses/invoice_summary.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/invoices_list.yml": { + /** + * List All Invoices + * @description To retrieve a list of all invoices, send a GET request to `/v2/customers/my/invoices`. + */ + responses: { + 200: external["resources/billing/responses/invoices.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/billing/models/balance.yml": { + /** + * @description Balance as of the `generated_at` time. This value includes the `account_balance` and `month_to_date_usage`. + * @example 23.44 + */ + month_to_date_balance?: string; + /** + * @description Current balance of the customer's most recent billing activity. Does not reflect `month_to_date_usage`. + * @example 12.23 + */ + account_balance?: string; + /** + * @description Amount used in the current billing period as of the `generated_at` time. + * @example 11.21 + */ + month_to_date_usage?: string; + /** + * Format: date-time + * @description The time at which balances were most recently generated. + * @example "2019-07-09T15:01:12.000Z" + */ + generated_at?: string; + } + "resources/billing/models/billing_address.yml": { + /** + * @description Street address line 1 + * @example 101 Shark Row + */ + address_line1?: string; + /** + * @description Street address line 2 + * @example + */ + address_line2?: string; + /** + * @description City + * @example Atlantis + */ + city?: string; + /** + * @description Region + * @example OC + */ + region?: string; + /** + * @description Postal code + * @example 12345 + */ + postal_code?: string; + /** + * @description Country (ISO2) code + * @example US + */ + country_iso2_code?: string; + /** + * @description Timestamp billing address was created + * @example "2019-09-03T16:34:46.000Z" + */ + created_at?: string; + /** + * @description Timestamp billing address was updated + * @example "2019-09-03T16:34:46.000Z" + */ + updated_at?: string; + } + "resources/billing/models/billing_history.yml": { + /** + * @description Description of the billing history entry. + * @example Invoice for May 2018 + */ + description?: string; + /** + * @description Amount of the billing history entry. + * @example 12.34 + */ + amount?: string; + /** + * @description ID of the invoice associated with the billing history entry, if applicable. + * @example 123 + */ + invoice_id?: string; + /** + * @description UUID of the invoice associated with the billing history entry, if applicable. + * @example example-uuid + */ + invoice_uuid?: string; + /** + * Format: date-time + * @description Time the billing history entry occurred. + * @example "2018-06-01T08:44:38.000Z" + */ + date?: string; + /** + * @description Type of billing history entry. + * @example Invoice + * @enum {string} + */ + type?: "ACHFailure" | "Adjustment" | "AttemptFailed" | "Chargeback" | "Credit" | "CreditExpiration" | "Invoice" | "Payment" | "Refund" | "Reversal"; + } + "resources/billing/models/invoice_item.yml": { + /** + * @description Name of the product being billed in the invoice item. + * @example Kubernetes Clusters + */ + product?: string; + /** + * @description UUID of the resource billing in the invoice item if available. + * @example 711157cb-37c8-4817-b371-44fa3504a39c + */ + resource_uuid?: string; + /** + * @description ID of the resource billing in the invoice item if available. + * @example 2353624 + */ + resource_id?: string; + /** + * @description Description of the invoice item when it is a grouped set of usage, such as DOKS or databases. + * @example my-doks-cluster + */ + group_description?: string; + /** + * @description Description of the invoice item. + * @example a56e086a317d8410c8b4cfd1f4dc9f82 + */ + description?: string; + /** + * @description Billed amount of this invoice item. Billed in USD. + * @example 12.34 + */ + amount?: string; + /** + * @description Duration of time this invoice item was used and subsequently billed. + * @example 744 + */ + duration?: string; + /** + * @description Unit of time for duration. + * @example Hours + */ + duration_unit?: string; + /** + * @description Time the invoice item began to be billed for usage. + * @example "2020-01-01T00:00:00.000Z" + */ + start_time?: string; + /** + * @description Time the invoice item stopped being billed for usage. + * @example "2020-02-01T00:00:00.000Z" + */ + end_time?: string; + /** + * @description Name of the DigitalOcean Project this resource belongs to. + * @example web + */ + project_name?: string; + } + "resources/billing/models/invoice_preview.yml": { + /** + * @description The UUID of the invoice. The canonical reference for the invoice. + * @example fdabb512-6faf-443c-ba2e-665452332a9e + */ + invoice_uuid?: string; + /** + * @description Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. + * @example 23.45 + */ + amount?: string; + /** + * @description Billing period of usage for which the invoice is issued, in `YYYY-MM` format. + * @example 2020-01 + */ + invoice_period?: string; + /** + * @description Time the invoice was last updated. This is only included with the invoice preview. + * @example "2020-01-23T06:31:50.000Z" + */ + updated_at?: string; + } + "resources/billing/models/invoice_summary.yml": { + /** + * @description UUID of the invoice + * @example 22737513-0ea7-4206-8ceb-98a575af7681 + */ + invoice_uuid?: string; + /** + * @description Billing period of usage for which the invoice is issued, in `YYYY-MM` format. + * @example 2020-01 + */ + billing_period?: string; + /** + * @description Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. + * @example 27.13 + */ + amount?: string; + /** + * @description Name of the DigitalOcean customer being invoiced. + * @example Sammy Shark + */ + user_name?: string; + user_billing_address?: Record & external["resources/billing/models/billing_address.yml"]; + /** + * @description Company of the DigitalOcean customer being invoiced, if set. + * @example DigitalOcean + */ + user_company?: string; + /** + * @description Email of the DigitalOcean customer being invoiced. + * @example sammy@digitalocean.com + */ + user_email?: string; + product_charges?: Record & external["resources/billing/models/product_usage_charges.yml"]; + overages?: Record & external["resources/billing/models/simple_charge.yml"]; + taxes?: Record & external["resources/billing/models/simple_charge.yml"]; + credits_and_adjustments?: Record & external["resources/billing/models/simple_charge.yml"]; + } + "resources/billing/models/product_charge_item.yml": { + /** + * @description Amount of the charge + * @example 10.00 + */ + amount?: string; + /** + * @description Description of the charge + * @example Spaces Subscription + */ + name?: string; + /** + * @description Number of times the charge was applied + * @example 1 + */ + count?: string; + } + "resources/billing/models/product_usage_charges.yml": { + /** + * @description Description of usage charges + * @example Product usage charges + */ + name?: string; + /** + * @description Total amount charged + * @example 12.34 + */ + amount?: string; + /** + * @description List of amount, and grouped aggregates by resource type. + * @example [ + * { + * "amount": "10.00", + * "name": "Spaces Subscription", + * "count": "1" + * }, + * { + * "amount": "2.34", + * "name": "Database Clusters", + * "count": "1" + * } + * ] + */ + items?: (external["resources/billing/models/product_charge_item.yml"])[]; + } + "resources/billing/models/simple_charge.yml": { + /** + * @description Name of the charge + * @example Overages + */ + name?: string; + /** + * @description Total amount charged in USD + * @example 3.45 + */ + amount?: string; + } + "resources/billing/parameters.yml": string + "resources/billing/responses/balance.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/billing/models/balance.yml"]; + }; + } + "resources/billing/responses/billing_history.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + billing_history?: (external["resources/billing/models/billing_history.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta_optional_total.yml"]; + }; + } + "resources/billing/responses/invoice_csv.yml": { + headers: { + "content-disposition": external["shared/headers.yml"]["content-disposition"]; + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "text/csv": string; + }; + } + "resources/billing/responses/invoice_pdf.yml": { + headers: { + "content-disposition": external["shared/headers.yml"]["content-disposition"]; + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/pdf": string; + }; + } + "resources/billing/responses/invoice_summary.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/billing/models/invoice_summary.yml"]; + }; + } + "resources/billing/responses/invoice.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + invoice_items?: (external["resources/billing/models/invoice_item.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/billing/responses/invoices.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + invoices?: (external["resources/billing/models/invoice_preview.yml"])[]; + invoice_preview?: external["resources/billing/models/invoice_preview.yml"]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/cdn/cdn_create_endpoint.yml": { + /** + * Create a New CDN Endpoint + * @description To create a new CDN endpoint, send a POST request to `/v2/cdn/endpoints`. The + * origin attribute must be set to the fully qualified domain name (FQDN) of a + * DigitalOcean Space. Optionally, the TTL may be configured by setting the `ttl` + * attribute. + * + * A custom subdomain may be configured by specifying the `custom_domain` and + * `certificate_id` attributes. + */ + requestBody: { + content: { + "application/json": external["resources/cdn/models/cdn_endpoint.yml"]; + }; + }; + responses: { + 201: external["resources/cdn/responses/existing_endpoint.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/cdn_delete_endpoint.yml": { + /** + * Delete a CDN Endpoint + * @description To delete a specific CDN endpoint, send a DELETE request to + * `/v2/cdn/endpoints/$ENDPOINT_ID`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/cdn_get_endpoint.yml": { + /** + * Retrieve an Existing CDN Endpoint + * @description To show information about an existing CDN endpoint, send a GET request to `/v2/cdn/endpoints/$ENDPOINT_ID`. + */ + responses: { + 200: external["resources/cdn/responses/existing_endpoint.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/cdn_list_endpoints.yml": { + /** + * List All CDN Endpoints + * @description To list all of the CDN endpoints available on your account, send a GET request to `/v2/cdn/endpoints`. + */ + responses: { + 200: external["resources/cdn/responses/all_cdn_endpoints.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/cdn_purge_cache.yml": { + /** + * Purge the Cache for an Existing CDN Endpoint + * @description To purge cached content from a CDN endpoint, send a DELETE request to + * `/v2/cdn/endpoints/$ENDPOINT_ID/cache`. The body of the request should include + * a `files` attribute containing a list of cached file paths to be purged. A + * path may be for a single file or may contain a wildcard (`*`) to recursively + * purge all files under a directory. When only a wildcard is provided, all + * cached files will be purged. + */ + requestBody: { + content: { + "application/json": external["resources/cdn/models/purge_cache.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/cdn_update_endpoint.yml": { + /** + * Update a CDN Endpoint + * @description To update the TTL, certificate ID, or the FQDN of the custom subdomain for + * an existing CDN endpoint, send a PUT request to + * `/v2/cdn/endpoints/$ENDPOINT_ID`. + */ + requestBody: { + content: { + "application/json": external["resources/cdn/models/update_endpoint.yml"]; + }; + }; + responses: { + 200: external["resources/cdn/responses/existing_endpoint.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/cdn/models/cdn_endpoint.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a CDN endpoint. + * @example 892071a0-bb95-49bc-8021-3afd67a210bf + */ + id?: string; + /** + * Format: hostname + * @description The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. + * @example static-images.nyc3.digitaloceanspaces.com + */ + origin: string; + /** + * Format: hostname + * @description The fully qualified domain name (FQDN) from which the CDN-backed content is served. + * @example static-images.nyc3.cdn.digitaloceanspaces.com + */ + endpoint?: string; + /** + * @description The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. + * @default 3600 + * @example 3600 + * @enum {integer} + */ + ttl?: 60 | 600 | 3600 | 86400 | 604800; + /** + * Format: uuid + * @description The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. + * @example 892071a0-bb95-49bc-8021-3afd67a210bf + */ + certificate_id?: string; + /** + * Format: hostname + * @description The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. + * @example static.example.com + */ + custom_domain?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. + * @example 2018-03-21T16:02:37Z + */ + created_at?: string; + } + "resources/cdn/models/purge_cache.yml": { + /** + * @description An array of strings containing the path to the content to be purged from the CDN cache. + * @example [ + * "path/to/image.png", + * "path/to/css/*" + * ] + */ + files: (string)[]; + } + "resources/cdn/models/update_endpoint.yml": { + /** + * @description The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. + * @default 3600 + * @example 3600 + * @enum {integer} + */ + ttl?: 60 | 600 | 3600 | 86400 | 604800; + /** + * Format: uuid + * @description The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. + * @example 892071a0-bb95-49bc-8021-3afd67a210bf + */ + certificate_id?: string; + /** + * Format: hostname + * @description The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. + * @example static.example.com + */ + custom_domain?: string; + } + "resources/cdn/parameters.yml": string + "resources/cdn/responses/all_cdn_endpoints.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + endpoints?: (external["resources/cdn/models/cdn_endpoint.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/cdn/responses/existing_endpoint.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + endpoint?: external["resources/cdn/models/cdn_endpoint.yml"]; + }; + }; + } + "resources/certificates/certificates_create.yml": { + /** + * Create a New Certificate + * @description To upload new SSL certificate which you have previously generated, send a POST + * request to `/v2/certificates`. + * + * When uploading a user-generated certificate, the `private_key`, + * `leaf_certificate`, and optionally the `certificate_chain` attributes should + * be provided. The type must be set to `custom`. + * + * When using Let's Encrypt to create a certificate, the `dns_names` attribute + * must be provided, and the type must be set to `lets_encrypt`. + */ + requestBody: { + content: { + "application/json": external["resources/certificates/models/certificate_create.yml"]["certificate_request_lets_encrypt"] | external["resources/certificates/models/certificate_create.yml"]["certificate_request_custom"]; + }; + }; + responses: { + 201: external["resources/certificates/responses/new_certificate.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/certificates/certificates_delete.yml": { + /** + * Delete a Certificate + * @description To delete a specific certificate, send a DELETE request to + * `/v2/certificates/$CERTIFICATE_ID`. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/certificates/certificates_get.yml": { + /** + * Retrieve an Existing Certificate + * @description To show information about an existing certificate, send a GET request to `/v2/certificates/$CERTIFICATE_ID`. + */ + responses: { + 200: external["resources/certificates/responses/existing_certificate.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/certificates/certificates_list.yml": { + /** + * List All Certificates + * @description To list all of the certificates available on your account, send a GET request to `/v2/certificates`. + */ + responses: { + 200: external["resources/certificates/responses/all_certificates.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/certificates/models/certificate_create.yml": Record + "resources/certificates/models/certificate.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a certificate. + * @example 892071a0-bb95-49bc-8021-3afd67a210bf + */ + id?: string; + /** + * @description A unique human-readable name referring to a certificate. + * @example web-cert-01 + */ + name?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents the certificate's expiration date. + * @example "2017-02-22T00:23:00.000Z" + */ + not_after?: string; + /** + * @description A unique identifier generated from the SHA-1 fingerprint of the certificate. + * @example dfcc9f57d86bf58e321c2c6c31c7a971be244ac7 + */ + sha1_fingerprint?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the certificate was created. + * @example "2017-02-08T16:02:37.000Z" + */ + created_at?: string; + /** + * @description An array of fully qualified domain names (FQDNs) for which the certificate was issued. + * @example [ + * "www.example.com", + * "example.com" + * ] + */ + dns_names?: (string)[]; + /** + * @description A string representing the current state of the certificate. It may be `pending`, `verified`, or `error`. + * @example verified + * @enum {string} + */ + state?: "pending" | "verified" | "error"; + /** + * @description A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. + * @example lets_encrypt + * @enum {string} + */ + type?: "custom" | "lets_encrypt"; + } + "resources/certificates/parameters.yml": string + "resources/certificates/responses/all_certificates.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + certificates?: (external["resources/certificates/models/certificate.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/certificates/responses/examples.yml": unknown + "resources/certificates/responses/existing_certificate.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + certificate?: external["resources/certificates/models/certificate.yml"]; + }; + }; + } + "resources/certificates/responses/new_certificate.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + certificate?: external["resources/certificates/models/certificate.yml"]; + }; + }; + } + "resources/databases/databases_add_connectionPool.yml": { + /** + * Add a New Connection Pool (PostgreSQL) + * @description For PostgreSQL database clusters, connection pools can be used to allow a + * database to share its idle connections. The popular PostgreSQL connection + * pooling utility PgBouncer is used to provide this service. [See here for more information](https://www.digitalocean.com/docs/databases/postgresql/how-to/manage-connection-pools/) + * about how and why to use PgBouncer connection pooling including + * details about the available transaction modes. + * + * To add a new connection pool to a PostgreSQL database cluster, send a POST + * request to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool, + * the user to connect with, the database to connect to, as well as its desired + * size and transaction mode. + */ + requestBody: { + content: { + /** + * @example { + * "name": "backend-pool", + * "mode": "transaction", + * "size": 10, + * "db": "defaultdb", + * "user": "doadmin" + * } + */ + "application/json": external["resources/databases/models/connection_pool.yml"]; + }; + }; + responses: { + 201: external["resources/databases/responses/connection_pool.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_add_user.yml": { + /** + * Add a Database User + * @description To add a new database user, send a POST request to `/v2/databases/$DATABASE_ID/users` + * with the desired username. + * + * Note: User management is not supported for Redis clusters. + * + * When adding a user to a MySQL cluster, additional options can be configured in the + * `mysql_settings` object. + * + * The response will be a JSON object with a key called `user`. The value of this will be an + * object that contains the standard attributes associated with a database user including + * its randomly generated password. + */ + requestBody: { + content: { + "application/json": external["resources/databases/models/database_user.yml"]; + }; + }; + responses: { + 201: external["resources/databases/responses/user.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_add.yml": { + /** + * Add a New Database + * @description To add a new database to an existing cluster, send a POST request to + * `/v2/databases/$DATABASE_ID/dbs`. + * + * Note: Database management is not supported for Redis clusters. + * + * The response will be a JSON object with a key called `db`. The value of this will be + * an object that contains the standard attributes associated with a database. + */ + requestBody: { + content: { + /** + * @example { + * "name": "alpha" + * } + */ + "application/json": external["resources/databases/models/database.yml"]; + }; + }; + responses: { + 201: external["resources/databases/responses/database.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_create_cluster.yml": { + /** + * Create a New Database Cluster + * @description To create a database cluster, send a POST request to `/v2/databases`. + * The response will be a JSON object with a key called `database`. The value of this will be an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster's `status` attribute will be `creating`. When the cluster is ready to receive traffic, this will transition to `online`. + * The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. + * DigitalOcean managed PostgreSQL and MySQL database clusters take automated daily backups. To create a new database cluster based on a backup of an existing cluster, send a POST request to `/v2/databases`. In addition to the standard database cluster attributes, the JSON body must include a key named `backup_restore` with the name of the original database cluster and the timestamp of the backup to be restored. Creating a database from a backup is the same as forking a database in the control panel. + * Note: Backups are not supported for Redis clusters. + */ + requestBody: { + content: { + "application/json": external["resources/databases/models/database_cluster.yml"] & { + backup_restore?: external["resources/databases/models/database_backup.yml"]; + }; + }; + }; + responses: { + 201: external["resources/databases/responses/database_cluster.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_create_replica.yml": { + /** + * Create a Read-only Replica + * @description To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/replicas` specifying the name it should be given, the size of the node to be used, and the region where it will be located. + * **Note**: Read-only replicas are not supported for Redis clusters. + * The response will be a JSON object with a key called `replica`. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's `status` attribute will be `forking`. When the replica is ready to receive traffic, this will transition to `active`. + */ + requestBody?: { + content: { + /** + * @example { + * "name": "read-nyc3-01", + * "region": "nyc3", + * "size": "db-s-2vcpu-4gb" + * } + */ + "application/json": external["resources/databases/models/database_replica.yml"]; + }; + }; + responses: { + 201: external["resources/databases/responses/database_replica.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_delete_connectionPool.yml": { + /** + * Delete a Connection Pool (PostgreSQL) + * @description To delete a specific connection pool for a PostgreSQL database cluster, send + * a DELETE request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_delete_onlineMigration.yml": { + /** + * Stop an Online Migration + * @description To stop an online migration, send a DELETE request to `/v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID`. + * + * A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_delete_user.yml": { + /** + * Remove a Database User + * @description To remove a specific database user, send a DELETE request to + * `/v2/databases/$DATABASE_ID/users/$USERNAME`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + * + * Note: User management is not supported for Redis clusters. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_delete.yml": { + /** + * Delete a Database + * @description To delete a specific database, send a DELETE request to + * `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + * + * Note: Database management is not supported for Redis clusters. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_destroy_cluster.yml": { + /** + * Destroy a Database Cluster + * @description To destroy a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID`. + * A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_destroy_replica.yml": { + /** + * Destroy a Read-only Replica + * @description To destroy a specific read-only replica, send a DELETE request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. + * **Note**: Read-only replicas are not supported for Redis clusters. + * A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_ca.yml": { + /** + * Retrieve the Public Certificate + * @description To retrieve the public certificate used to secure the connection to the database cluster send a GET request to + * `/v2/databases/$DATABASE_ID/ca`. + * + * The response will be a JSON object with a `ca` key. This will be set to an object + * containing the base64 encoding of the public key certificate. + */ + responses: { + 200: external["resources/databases/responses/ca.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_cluster.yml": { + /** + * Retrieve an Existing Database Cluster + * @description To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID`. + * The response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes. + * The embedded connection and private_connection objects will contain the information needed to access the database cluster. + * The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster. + */ + responses: { + 200: external["resources/databases/responses/database_cluster.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_config.yml": { + /** + * Retrieve an Existing Database Cluster Configuration + * @description Shows configuration parameters for an existing database cluster by sending a GET request to + * `/v2/databases/$DATABASE_ID/config`. + * The response is a JSON object with a `config` key, which is set to an object + * containing any database configuration parameters. + */ + responses: { + 200: external["resources/databases/responses/database_config.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_connectionPool.yml": { + /** + * Retrieve Existing Connection Pool (PostgreSQL) + * @description To show information about an existing connection pool for a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. + * The response will be a JSON object with a `pool` key. + */ + responses: { + 200: external["resources/databases/responses/connection_pool.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_evictionPolicy.yml": { + /** + * Retrieve the Eviction Policy for a Redis Cluster + * @description To retrieve the configured eviction policy for an existing Redis cluster, send a GET request to `/v2/databases/$DATABASE_ID/eviction_policy`. + * The response will be a JSON object with an `eviction_policy` key. This will be set to a string representing the eviction policy. + */ + responses: { + 200: external["resources/databases/responses/eviction_policy_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_migrationStatus.yml": { + /** + * Retrieve the Status of an Online Migration + * @description To retrieve the status of the most recent online migration, send a GET request to `/v2/databases/$DATABASE_ID/online-migration`. + */ + responses: { + 200: external["resources/databases/responses/online_migration.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_replica.yml": { + /** + * Retrieve an Existing Read-only Replica + * @description To show information about an existing database replica, send a GET request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. + * **Note**: Read-only replicas are not supported for Redis clusters. + * The response will be a JSON object with a `replica key`. This will be set to an object containing the standard database replica attributes. + */ + responses: { + 200: external["resources/databases/responses/database_replica.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_sql_mode.yml": { + /** + * Retrieve the SQL Modes for a MySQL Cluster + * @description To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to `/v2/databases/$DATABASE_ID/sql_mode`. + * The response will be a JSON object with a `sql_mode` key. This will be set to a string representing the configured SQL modes. + */ + responses: { + 200: external["resources/databases/responses/sql_mode.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get_user.yml": { + /** + * Retrieve an Existing Database User + * @description To show information about an existing database user, send a GET request to + * `/v2/databases/$DATABASE_ID/users/$USERNAME`. + * + * Note: User management is not supported for Redis clusters. + * + * The response will be a JSON object with a `user` key. This will be set to an object + * containing the standard database user attributes. + * + * For MySQL clusters, additional options will be contained in the mysql_settings + * object. + */ + responses: { + 200: external["resources/databases/responses/user.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_get.yml": { + /** + * Retrieve an Existing Database + * @description To show information about an existing database cluster, send a GET request to + * `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. + * + * Note: Database management is not supported for Redis clusters. + * + * The response will be a JSON object with a `db` key. This will be set to an object + * containing the standard database attributes. + */ + responses: { + 200: external["resources/databases/responses/database.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_backups.yml": { + /** + * List Backups for a Database Cluster + * @description To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/backups`. + * **Note**: Backups are not supported for Redis clusters. + * The result will be a JSON object with a `backups key`. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created. + */ + responses: { + 200: external["resources/databases/responses/database_backups.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_clusters.yml": { + /** + * List All Database Clusters + * @description To list all of the database clusters available on your account, send a GET request to `/v2/databases`. To limit the results to database clusters with a specific tag, include the `tag_name` query parameter set to the name of the tag. For example, `/v2/databases?tag_name=$TAG_NAME`. + * The result will be a JSON object with a `databases` key. This will be set to an array of database objects, each of which will contain the standard database attributes. + * The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster: + * The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster. + */ + responses: { + 200: external["resources/databases/responses/database_clusters.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_connectionPools.yml": { + /** + * List Connection Pools (PostgreSQL) + * @description To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools`. + * The result will be a JSON object with a `pools` key. This will be set to an array of connection pool objects. + */ + responses: { + 200: external["resources/databases/responses/connection_pools.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_firewall_rules.yml": { + /** + * List Firewall Rules (Trusted Sources) for a Database Cluster + * @description To list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to `/v2/databases/$DATABASE_ID/firewall`. + * The result will be a JSON object with a `rules` key. + */ + responses: { + 200: external["resources/databases/responses/firewall_rules.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_options.yml": { + /** + * List Database Options + * @description To list all of the options available for the offered database engines, send a GET request to `/v2/databases/options`. + * The result will be a JSON object with an `options` key. + */ + responses: { + 200: external["resources/databases/responses/options.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_replicas.yml": { + /** + * List All Read-only Replicas + * @description To list all of the read-only replicas associated with a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/replicas`. + * **Note**: Read-only replicas are not supported for Redis clusters. + * The result will be a JSON object with a `replicas` key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes. + */ + responses: { + 200: external["resources/databases/responses/database_replicas.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list_users.yml": { + /** + * List all Database Users + * @description To list all of the users for your database cluster, send a GET request to + * `/v2/databases/$DATABASE_ID/users`. + * + * Note: User management is not supported for Redis clusters. + * + * The result will be a JSON object with a `users` key. This will be set to an array + * of database user objects, each of which will contain the standard database user attributes. + * + * For MySQL clusters, additional options will be contained in the mysql_settings object. + */ + responses: { + 200: external["resources/databases/responses/users.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_list.yml": { + /** + * List All Databases + * @description To list all of the databases in a clusters, send a GET request to + * `/v2/databases/$DATABASE_ID/dbs`. + * + * The result will be a JSON object with a `dbs` key. This will be set to an array + * of database objects, each of which will contain the standard database attributes. + * + * Note: Database management is not supported for Redis clusters. + */ + responses: { + 200: external["resources/databases/responses/databases.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_patch_config.yml": { + /** + * Update the Database Configuration for an Existing Database + * @description To update the configuration for an existing database cluster, send a PATCH request to + * `/v2/databases/$DATABASE_ID/config`. + */ + requestBody: { + content: { + /** + * @example { + * "config": { + * "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES", + * "sql_require_primary_key": true + * } + * } + */ + "application/json": external["resources/databases/models/database_config.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_reset_auth.yml": { + /** + * Reset a Database User's Password or Authentication Method + * @description To reset the password for a database user, send a POST request to + * `/v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth`. + * + * For `mysql` databases, the authentication method can be specifying by + * including a key in the JSON body called `mysql_settings` with the `auth_plugin` + * value specified. + * + * The response will be a JSON object with a `user` key. This will be set to an + * object containing the standard database user attributes. + */ + requestBody: { + content: { + /** + * @example { + * "mysql_settings": { + * "auth_plugin": "caching_sha2_password" + * } + * } + */ + "application/json": { + mysql_settings?: external["resources/databases/models/mysql_settings.yml"]; + }; + }; + }; + responses: { + 200: external["resources/databases/responses/user.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_clusterSize.yml": { + /** + * Resize a Database Cluster + * @description To resize a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/resize`. The body of the request must specify both the size and num_nodes attributes. + * A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed. + */ + requestBody: { + content: { + /** + * @example { + * "size": "db-s-4vcpu-8gb", + * "num_nodes": 3 + * } + */ + "application/json": external["resources/databases/models/database_cluster_resize.yml"]; + }; + }; + responses: { + 202: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_evictionPolicy.yml": { + /** + * Configure the Eviction Policy for a Redis Cluster + * @description To configure an eviction policy for an existing Redis cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy. + */ + requestBody: { + content: { + /** + * @example { + * "eviction_policy": "allkeys_lru" + * } + */ + "application/json": { + eviction_policy: external["resources/databases/models/eviction_policy_model.yml"]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_firewall_rules.yml": { + /** + * Update Firewall Rules (Trusted Sources) for a Database + * @description To update a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to `/v2/databases/$DATABASE_ID/firewall` specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend [placing your databases into a VPC network](https://www.digitalocean.com/docs/networking/vpc/) to limit access to them instead of using a firewall. + * A successful + */ + requestBody: { + content: { + /** + * @example { + * "rules": [ + * { + * "type": "ip_addr", + * "value": "192.168.1.1" + * }, + * { + * "type": "k8s", + * "value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61" + * }, + * { + * "type": "droplet", + * "value": "163973392" + * }, + * { + * "type": "tag", + * "value": "backend" + * } + * ] + * } + */ + "application/json": { + rules?: (external["resources/databases/models/firewall_rule.yml"])[]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_maintenanceWindow.yml": { + /** + * Configure a Database Cluster's Maintenance Window + * @description To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/maintenance`. + * A successful request will receive a 204 No Content status code with no body in response. + */ + requestBody: { + content: { + /** + * @example { + * "day": "tuesday", + * "hour": "14:00" + * } + */ + "application/json": external["resources/databases/models/database_maintenance_window.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_onlineMigration.yml": { + /** + * Start an Online Migration + * @description To start an online migration, send a PUT request to `/v2/databases/$DATABASE_ID/online-migration` endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, and Redis clusters. + */ + requestBody: { + content: { + /** + * @example { + * "source": { + * "host": "source-do-user-6607903-0.b.db.ondigitalocean.com", + * "dbname": "defaultdb", + * "port": 25060, + * "username": "doadmin", + * "password": "paakjnfe10rsrsmf" + * }, + * "disable_ssl": false + * } + */ + "application/json": external["resources/databases/models/source_database.yml"]; + }; + }; + responses: { + 200: external["resources/databases/responses/online_migration.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_region.yml": { + /** + * Migrate a Database Cluster to a New Region + * @description To migrate a database cluster to a new region, send a `PUT` request to + * `/v2/databases/$DATABASE_ID/migrate`. The body of the request must specify a + * `region` attribute. + * + * A successful request will receive a 202 Accepted status code with no body in + * response. Querying the database cluster will show that its `status` attribute + * will now be set to `migrating`. This will transition back to `online` when the + * migration has completed. + */ + requestBody: { + content: { + "application/json": { + /** + * @description A slug identifier for the region to which the database cluster will be migrated. + * @example lon1 + */ + region: string; + }; + }; + }; + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/databases_update_sql_mode.yml": { + /** + * Update SQL Mode for a Cluster + * @description To configure the SQL modes for an existing MySQL cluster, send a PUT request to `/v2/databases/$DATABASE_ID/sql_mode` specifying the desired modes. See the official MySQL 8 documentation for a [full list of supported SQL modes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-full). + * A successful request will receive a 204 No Content status code with no body in response. + */ + requestBody: { + content: { + /** + * @example { + * "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE" + * } + */ + "application/json": external["resources/databases/models/sql_mode.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/databases/models/backup.yml": { + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format at which the backup was created. + * @example "2019-01-31T19:25:22.000Z" + */ + created_at: string; + /** + * @description The size of the database backup in GBs. + * @example 0.03364864 + */ + size_gigabytes: number; + } + "resources/databases/models/ca.yml": { + /** + * @description base64 encoding of the certificate used to secure database connections + * @example LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== + */ + certificate: string; + } + "resources/databases/models/connection_pool.yml": { + /** + * @description A unique name for the connection pool. Must be between 3 and 60 characters. + * @example backend-pool + */ + name: string; + /** + * @description The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. + * @example transaction + */ + mode: string; + /** + * Format: int32 + * @description The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. + * @example 10 + */ + size: number; + /** + * @description The database for use with the connection pool. + * @example defaultdb + */ + db: string; + /** + * @description The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. + * @example doadmin + */ + user?: string; + connection?: external["resources/databases/models/database_connection.yml"] & Record; + private_connection?: external["resources/databases/models/database_connection.yml"] & Record; + } + "resources/databases/models/connection_pools.yml": { + /** @description An array of connection pool objects. */ + pools?: readonly (external["resources/databases/models/connection_pool.yml"])[]; + } + "resources/databases/models/database_backup.yml": { + /** + * @description The name of an existing database cluster from which the backup will be restored. + * @example backend + */ + database_name: string; + /** + * Format: date-time + * @description The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded. + * @example "2019-01-31T19:25:22.000Z" + */ + backup_created_at?: string; + } + "resources/databases/models/database_cluster_resize.yml": { + /** + * @description A slug identifier representing desired the size of the nodes in the database cluster. + * @example db-s-4vcpu-8gb + */ + size: string; + /** + * Format: int32 + * @description The number of nodes in the database cluster. Valid values are are 1-3. In addition to the primary node, up to two standby nodes may be added for highly available configurations. + * @example 3 + */ + num_nodes: number; + } + "resources/databases/models/database_cluster.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a database cluster. + * @example 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 + */ + id?: string; + /** + * @description A unique, human-readable name referring to a database cluster. + * @example backend + */ + name: string; + /** + * @description A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Redis, and "mongodb" for MongoDB. + * @example pg + * @enum {string} + */ + engine: "pg" | "mysql" | "redis" | "mongodb"; + /** + * @description A string representing the version of the database engine in use for the cluster. + * @example 10 + */ + version?: string; + /** + * @description The number of nodes in the database cluster. + * @example 2 + */ + num_nodes: number; + /** + * @description The slug identifier representing the size of the nodes in the database cluster. + * @example db-s-2vcpu-4gb + */ + size: string; + /** + * @description The slug identifier for the region where the database cluster is located. + * @example nyc3 + */ + region: string; + /** + * @description A string representing the current status of the database cluster. + * @example creating + * @enum {string} + */ + status?: "creating" | "online" | "resizing" | "migrating" | "forking"; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the database cluster was created. + * @example "2019-01-11T18:37:36.000Z" + */ + created_at?: string; + /** + * @description A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. + * @example d455e75d-4858-4eec-8c95-da2f0a5f93a7 + */ + private_network_uuid?: string; + /** + * @description An array of tags that have been applied to the database cluster. + * @example [ + * "production" + * ] + */ + tags?: (string)[]; + /** + * @description An array of strings containing the names of databases created in the database cluster. + * @example [ + * "doadmin" + * ] + */ + db_names?: readonly (string)[]; + connection?: external["resources/databases/models/database_connection.yml"] & Record; + private_connection?: external["resources/databases/models/database_connection.yml"] & Record; + users?: readonly (external["resources/databases/models/database_user.yml"])[]; + maintenance_window?: external["resources/databases/models/database_maintenance_window.yml"] & Record; + /** + * Format: uuid + * @description The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. + * @example 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 + */ + project_id?: string; + rules?: (external["resources/databases/models/firewall_rule.yml"])[]; + } + "resources/databases/models/database_config.yml": { + config?: external["resources/databases/models/mysql.yml"] | external["resources/databases/models/postgres.yml"] | external["resources/databases/models/redis.yml"]; + } + "resources/databases/models/database_connection.yml": { + /** + * @description A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes. + * @example postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require + */ + uri?: string; + /** + * @description The name of the default database. + * @example defaultdb + */ + database?: string; + /** + * @description The FQDN pointing to the database cluster's current primary node. + * @example backend-do-user-19081923-0.db.ondigitalocean.com + */ + host?: string; + /** + * @description The port on which the database cluster is listening. + * @example 25060 + */ + port?: number; + /** + * @description The default user for the database. + * @example doadmin + */ + user?: string; + /** + * @description The randomly generated password for the default user. + * @example wv78n3zpz42xezdk + */ + password?: string; + /** + * @description A boolean value indicating if the connection should be made over SSL. + * @example true + */ + ssl?: boolean; + } + "resources/databases/models/database_layout_option.yml": { + /** @example 1 */ + num_nodes?: number; + /** + * @description An array of objects containing the slugs available with various node counts + * @example [ + * "db-s-1vcpu-1gb", + * "db-s-1vcpu-2gb" + * ] + */ + sizes?: readonly (string)[]; + } + "resources/databases/models/database_layout_options.yml": { + /** @description An array of objects, each indicating the node sizes (otherwise referred to as slugs) that are available with various numbers of nodes in the database cluster. Each slugs denotes the node's identifier, CPU, and RAM (in that order). */ + layouts?: readonly (external["resources/databases/models/database_layout_option.yml"])[]; + } + "resources/databases/models/database_maintenance_window.yml": { + /** + * @description The day of the week on which to apply maintenance updates. + * @example tuesday + */ + day: string; + /** + * @description The hour in UTC at which maintenance updates will be applied in 24 hour format. + * @example 14:00 + */ + hour: string; + /** + * @description A boolean value indicating whether any maintenance is scheduled to be performed in the next window. + * @example true + */ + pending?: boolean; + /** + * @description A list of strings, each containing information about a pending maintenance update. + * @example [ + * "Update TimescaleDB to version 1.2.1", + * "Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases" + * ] + */ + description?: readonly (string)[]; + } | null + "resources/databases/models/database_region_options.yml": { + /** + * @description An array of strings containing the names of available regions + * @example [ + * "ams3", + * "blr1" + * ] + */ + regions?: readonly (string)[]; + } + "resources/databases/models/database_replica.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a database replica. + * @example 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 + */ + id?: string; + /** + * @description The name to give the read-only replicating + * @example read-nyc3-01 + */ + name: string; + /** + * @description A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. + * @example nyc3 + */ + region?: string; + /** + * @description A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. + * @example db-s-2vcpu-4gb + */ + size?: string; + /** + * @description A string representing the current status of the database cluster. + * @example creating + * @enum {string} + */ + status?: "creating" | "online" | "resizing" | "migrating" | "forking"; + /** + * @description A flat array of tag names as strings to apply to the read-only replica after it is created. Tag names can either be existing or new tags. + * @example [ + * "production" + * ] + */ + tags?: (string)[]; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the database cluster was created. + * @example "2019-01-11T18:37:36.000Z" + */ + created_at?: string; + /** + * @description A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. + * @example 9423cbad-9211-442f-820b-ef6915e99b5f + */ + private_network_uuid?: string; + connection?: Record & external["resources/databases/models/database_connection.yml"]; + private_connection?: Record & external["resources/databases/models/database_connection.yml"]; + } + "resources/databases/models/database_user.yml": { + /** + * @description The name of a database user. + * @example app-01 + */ + name: string; + /** + * @description A string representing the database user's role. The value will be either + * "primary" or "normal". + * + * @example normal + * @enum {string} + */ + role?: "primary" | "normal"; + /** + * @description A randomly generated password for the database user. + * @example jge5lfxtzhx42iff + */ + password?: string; + mysql_settings?: external["resources/databases/models/mysql_settings.yml"]; + } + "resources/databases/models/database_version_options.yml": { + /** + * @description An array of strings containing the names of available regions + * @example [ + * "4.4", + * "5.0" + * ] + */ + versions?: readonly (string)[]; + } + "resources/databases/models/database.yml": { + /** + * @description The name of the database. + * @example alpha + */ + name: string; + } + "resources/databases/models/eviction_policy_model.yml": "noeviction" | "allkeys_lru" | "allkeys_random" | "volatile_lru" | "volatile_random" | "volatile_ttl" + "resources/databases/models/firewall_rule.yml": { + /** + * @description A unique ID for the firewall rule itself. + * @example 79f26d28-ea8a-41f2-8ad8-8cfcdd020095 + */ + uuid?: string; + /** + * @description A unique ID for the database cluster to which the rule is applied. + * @example 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 + */ + cluster_uuid?: string; + /** + * @description The type of resource that the firewall rule allows to access the database cluster. + * @example droplet + * @enum {string} + */ + type: "droplet" | "k8s" | "ip_addr" | "tag" | "app"; + /** + * @description The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. + * @example ff2a6c52-5a44-4b63-b99c-0e98e7a63d61 + */ + value: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. + * @example "2019-01-11T18:37:36.000Z" + */ + created_at?: string; + } + "resources/databases/models/mysql_settings.yml": { + /** + * @description A string specifying the authentication method to be used for connections + * to the MySQL user account. The valid values are `mysql_native_password` + * or `caching_sha2_password`. If excluded when creating a new user, the + * default for the version of MySQL in use will be used. As of MySQL 8.0, the + * default is `caching_sha2_password`. + * + * @example mysql_native_password + * @enum {string} + */ + auth_plugin: "mysql_native_password" | "caching_sha2_password"; + } + "resources/databases/models/mysql.yml": { + /** + * @description The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. + * @example 3 + */ + backup_hour?: number; + /** + * @description The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed. + * @example 30 + */ + backup_minute?: number; + /** + * @description Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas. + * @example ANSI,TRADITIONAL + */ + sql_mode?: string; + /** + * @description The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake. + * @example 10 + */ + connect_timeout?: number; + /** + * @description Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or 'SYSTEM' to use the MySQL server default. + * @example +03:00 + */ + default_time_zone?: string; + /** + * @description The maximum permitted result length, in bytes, for the GROUP_CONCAT() function. + * @example 1024 + */ + group_concat_max_len?: number; + /** + * @description The time, in seconds, before cached statistics expire. + * @example 86400 + */ + information_schema_stats_expiry?: number; + /** + * @description The minimum length of words that an InnoDB FULLTEXT index stores. + * @example 3 + */ + innodb_ft_min_token_size?: number; + /** + * @description The InnoDB FULLTEXT index stopword list for all InnoDB tables. + * @example db_name/table_name + */ + innodb_ft_server_stopword_table?: string; + /** + * @description The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up. + * @example 50 + */ + innodb_lock_wait_timeout?: number; + /** + * @description The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk. + * @example 16777216 + */ + innodb_log_buffer_size?: number; + /** + * @description The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables. + * @example 134217728 + */ + innodb_online_alter_log_max_size?: number; + /** + * @description When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default. + * @example true + */ + innodb_print_all_deadlocks?: boolean; + /** + * @description When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction. + * @example true + */ + innodb_rollback_on_timeout?: boolean; + /** + * @description The time, in seconds, the server waits for activity on an interactive. connection before closing it. + * @example 3600 + */ + interactive_timeout?: number; + /** + * @description The storage engine for in-memory internal temporary tables. + * @example TempTable + * @enum {string} + */ + internal_tmp_mem_storage_engine?: "TempTable" | "MEMORY"; + /** + * @description The time, in seconds, to wait for more data from an existing connection. aborting the read. + * @example 30 + */ + net_read_timeout?: number; + /** + * @description The number of seconds to wait for a block to be written to a connection before aborting the write. + * @example 30 + */ + net_write_timeout?: number; + /** + * @description Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + * @example true + */ + sql_require_primary_key?: boolean; + /** + * @description The number of seconds the server waits for activity on a noninteractive connection before closing it. + * @example 28800 + */ + wait_timeout?: number; + /** + * @description The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M). + * @example 67108864 + */ + max_allowed_packet?: number; + /** + * @description The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) + * @example 16777216 + */ + max_heap_table_size?: number; + /** + * @description The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K). + * @example 262144 + */ + sort_buffer_size?: number; + /** + * @description The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + * @example 16777216 + */ + tmp_table_size?: number; + /** + * @description When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false. + * @example true + */ + slow_query_log?: boolean; + /** + * @description The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds. + * @example 10 + */ + long_query_time?: number; + /** + * @description The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector. + * @example 600 + */ + binlog_retention_period?: number; + } + "resources/databases/models/online_migration.yml": { + /** + * @description The ID of the most recent migration. + * @example 77b28fc8-19ff-11eb-8c9c-c68e24557488 + */ + id?: string; + /** + * @description The current status of the migration. + * @example running + * @enum {string} + */ + status?: "running" | "canceled" | "error" | "done"; + /** + * @description The time the migration was initiated, in ISO 8601 format. + * @example "2020-10-29T15:57:38.000Z" + */ + created_at?: string; + } + "resources/databases/models/options.yml": { + options?: { + mongodb?: external["resources/databases/models/database_region_options.yml"] & external["resources/databases/models/database_version_options.yml"] & external["resources/databases/models/database_layout_options.yml"]; + pg?: external["resources/databases/models/database_region_options.yml"] & external["resources/databases/models/database_version_options.yml"] & external["resources/databases/models/database_layout_options.yml"]; + mysql?: external["resources/databases/models/database_region_options.yml"] & external["resources/databases/models/database_version_options.yml"] & external["resources/databases/models/database_layout_options.yml"]; + redis?: external["resources/databases/models/database_region_options.yml"] & external["resources/databases/models/database_version_options.yml"] & external["resources/databases/models/database_layout_options.yml"]; + }; + } + "resources/databases/models/pgbouncer.yml": { + /** + * @description Run server_reset_query (DISCARD ALL) in all pooling modes. + * @example false + */ + server_reset_query_always?: boolean; + /** + * @description List of parameters to ignore when given in startup packet. + * @example [ + * "extra_float_digits", + * "search_path" + * ] + */ + ignore_startup_parameters?: ("extra_float_digits" | "search_path")[]; + /** + * @description If current server connections are below this number, adds more. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. + * @example 1 + */ + min_pool_size?: number; + /** + * @description The pooler closes any unused server connection that has been connected longer than this amount of seconds. + * @example 3600 + */ + server_lifetime?: number; + /** + * @description Drops server connections if they have been idle more than this many seconds. If 0, timeout is disabled. + * @example 600 + */ + server_idle_timeout?: number; + /** + * @description If non-zero, automatically creates a pool of that size per user when a pool doesn't exist. + * @example 1 + */ + autodb_pool_size?: number; + /** + * @description PGBouncer pool mode + * @example session + * @enum {string} + */ + autodb_pool_mode?: "session" | "transaction" | "statement"; + /** + * @description Only allows a maximum this many server connections per database (regardless of user). If 0, allows unlimited connections. + * @example 1 + */ + autodb_max_db_connections?: number; + /** + * @description If the automatically-created database pools have been unused this many seconds, they are freed. If 0, timeout is disabled. + * @example 3600 + */ + autodb_idle_timeout?: number; + } + "resources/databases/models/postgres.yml": { + /** + * @description Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted. + * @example 200000000 + */ + autovacuum_freeze_max_age?: number; + /** + * @description Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start. + * @example 5 + */ + autovacuum_max_workers?: number; + /** + * @description Specifies the minimum delay, in seconds, between autovacuum runs on any given database. The default is one minute. + * @example 43200 + */ + autovacuum_naptime?: number; + /** + * @description Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. + * @example 50 + */ + autovacuum_vacuum_threshold?: number; + /** + * @description Specifies the minimum number of inserted, updated, or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples. + * @example 50 + */ + autovacuum_analyze_threshold?: number; + /** + * @description Specifies a fraction, in a decimal value, of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). + * @example 0.2 + */ + autovacuum_vacuum_scale_factor?: number; + /** + * @description Specifies a fraction, in a decimal value, of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size). + * @example 0.2 + */ + autovacuum_analyze_scale_factor?: number; + /** + * @description Specifies the cost delay value, in milliseconds, that will be used in automatic VACUUM operations. If -1, uses the regular vacuum_cost_delay value, which is 20 milliseconds. + * @example 20 + */ + autovacuum_vacuum_cost_delay?: number; + /** + * @description Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. + * @example -1 + */ + autovacuum_vacuum_cost_limit?: number; + /** + * @description The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. + * @example 3 + */ + backup_hour?: number; + /** + * @description The minute of the backup hour when backup for the service starts. New backup is only started if previous backup has already completed. + * @example 30 + */ + backup_minute?: number; + /** + * @description Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms. + * @example 200 + */ + bgwriter_delay?: number; + /** + * @description The amount of kilobytes that need to be written by the background writer before attempting to force the OS to issue these writes to underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback. + * @example 512 + */ + bgwriter_flush_after?: number; + /** + * @description The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100. + * @example 100 + */ + bgwriter_lru_maxpages?: number; + /** + * @description The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. + * @example 2 + */ + bgwriter_lru_multiplier?: number; + /** + * @description The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. + * @example 1000 + */ + deadlock_timeout?: number; + /** + * @description Specifies the default TOAST compression method for values of compressible columns (the default is lz4). + * @example lz4 + * @enum {string} + */ + default_toast_compression?: "lz4" | "pglz"; + /** + * @description Time out sessions with open transactions after this number of milliseconds + * @example 10000 + */ + idle_in_transaction_session_timeout?: number; + /** + * @description Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT). + * @example true + */ + jit?: boolean; + /** + * @description Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions. + * @example -1 + */ + log_autovacuum_min_duration?: number; + /** + * @description Controls the amount of detail written in the server log for each message that is logged. + * @example VERBOSE + * @enum {string} + */ + log_error_verbosity?: "TERSE" | "DEFAULT" | "VERBOSE"; + /** + * @description Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. + * @example pid=%p,user=%u,db=%d,app=%a,client=%h + * @enum {string} + */ + log_line_prefix?: "pid=%p,user=%u,db=%d,app=%a,client=%h" | "%m [%p] %q[user=%u,db=%d,app=%a]" | "%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h"; + /** + * @description Log statements that take more than this number of milliseconds to run. If -1, disables. + * @example -1 + */ + log_min_duration_statement?: number; + /** + * @description PostgreSQL maximum number of files that can be open per process. + * @example 2048 + */ + max_files_per_process?: number; + /** + * @description PostgreSQL maximum prepared transactions. + * @example 20 + */ + max_prepared_transactions?: number; + /** + * @description PostgreSQL maximum predicate locks per transaction. + * @example 128 + */ + max_pred_locks_per_transaction?: number; + /** + * @description PostgreSQL maximum locks per transaction. + * @example 128 + */ + max_locks_per_transaction?: number; + /** + * @description Maximum depth of the stack in bytes. + * @example 2097152 + */ + max_stack_depth?: number; + /** + * @description Max standby archive delay in milliseconds. + * @example 43200 + */ + max_standby_archive_delay?: number; + /** + * @description Max standby streaming delay in milliseconds. + * @example 43200 + */ + max_standby_streaming_delay?: number; + /** + * @description PostgreSQL maximum replication slots. + * @example 16 + */ + max_replication_slots?: number; + /** + * @description PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers). + * @example 16 + */ + max_logical_replication_workers?: number; + /** + * @description Sets the maximum number of workers that the system can support for parallel queries. + * @example 12 + */ + max_parallel_workers?: number; + /** + * @description Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. + * @example 16 + */ + max_parallel_workers_per_gather?: number; + /** + * @description Sets the maximum number of background processes that the system can support. + * @example 16 + */ + max_worker_processes?: number; + /** + * @description Controls which role to use for pg_partman's scheduled background tasks. Must consist of alpha-numeric characters, dots, underscores, or dashes. May not start with dash or dot. Maximum of 64 characters. + * @example myrolename + */ + "pg_partman_bgw.role"?: string; + /** + * @description Sets the time interval to run pg_partman's scheduled tasks. + * @example 3600 + */ + "pg_partman_bgw.interval"?: number; + /** + * @description Controls which statements are counted. Specify 'top' to track top-level statements (those issued directly by clients), 'all' to also track nested statements (such as statements invoked within functions), or 'none' to disable statement statistics collection. The default value is top. + * @example all + * @enum {string} + */ + "pg_stat_statements.track"?: "all" | "top" | "none"; + /** + * @description PostgreSQL temporary file limit in KiB. If -1, sets to unlimited. + * @example 5000000 + */ + temp_file_limit?: number; + /** + * @description PostgreSQL service timezone + * @example Europe/Helsinki + */ + timezone?: string; + /** + * @description Specifies the number of bytes reserved to track the currently executing command for each active session. + * @example 1024 + */ + track_activity_query_size?: number; + /** + * @description Record commit time of transactions. + * @example off + * @enum {string} + */ + track_commit_timestamp?: "off" | "on"; + /** + * @description Enables tracking of function call counts and time used. + * @example all + * @enum {string} + */ + track_functions?: "all" | "pl" | "none"; + /** + * @description Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + * @example off + * @enum {string} + */ + track_io_timing?: "off" | "on"; + /** + * @description PostgreSQL maximum WAL senders + * @example 8 + */ + max_wal_senders?: number; + /** + * @description Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. Must be either 0 or between 5000 and 10800000. + * @example 60000 + */ + wal_sender_timeout?: number; + /** + * @description WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance + * @example 50 + */ + wal_writer_delay?: number; + /** + * @description Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. + * @example 41.5 + */ + shared_buffers_percentage?: number; + pgbouncer?: external["resources/databases/models/pgbouncer.yml"]; + /** + * @description The maximum amount of memory, in MB, used by a query operation (such as a sort or hash table) before writing to temporary disk files. Default is 1MB + 0.075% of total RAM (up to 32MB). + * @example 4 + */ + work_mem?: number; + timescaledb?: external["resources/databases/models/timescaledb.yml"]; + /** + * @description Synchronous replication type. Note that the service plan also needs to support synchronous replication. + * @example off + * @enum {string} + */ + synchronous_replication?: "off" | "quorum"; + /** + * @description Enable the pg_stat_monitor extension. Enabling this extension will cause the cluster to be restarted. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + * @example false + */ + stat_monitor_enable?: boolean; + } + "resources/databases/models/redis.yml": { + redis_maxmemory_policy?: external["resources/databases/models/eviction_policy_model.yml"]; + /** + * @description Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + * @example 64 + */ + redis_pubsub_client_output_buffer_limit?: number; + /** + * @description Set number of redis databases. Changing this will cause a restart of redis service. + * @example 16 + */ + redis_number_of_databases?: number; + /** + * @description Redis IO thread count + * @example 1 + */ + redis_io_threads?: number; + /** + * @description Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies + * @default 10 + * @example 10 + */ + redis_lfu_log_factor?: number; + /** + * @description LFU maxmemory-policy counter decay time in minutes + * @default 1 + * @example 1 + */ + redis_lfu_decay_time?: number; + /** + * @description Require SSL to access Redis + * @default true + * @example true + */ + redis_ssl?: boolean; + /** + * @description Redis idle connection timeout in seconds + * @default 300 + * @example 300 + */ + redis_timeout?: number; + /** + * @description Set notify-keyspace-events option + * @default + * @example K + */ + redis_notify_keyspace_events?: string; + /** + * @description When persistence is 'rdb', Redis does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to backup schedule for backup purposes. When persistence is 'off', no RDB dumps and backups are done, so data can be lost at any moment if service is restarted for any reason, or if service is powered off. Also service can't be forked. + * @example rdb + * @enum {string} + */ + redis_persistence?: "off" | "rdb"; + /** + * @description Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Redis configuration acl-pubsub-default. + * @example allchannels + * @enum {string} + */ + redis_acl_channels_default?: "allchannels" | "resetchannels"; + } + "resources/databases/models/source_database.yml": { + source?: external["resources/databases/models/database_connection.yml"]; + /** + * @description Enables SSL encryption when connecting to the source database. + * @example false + */ + disable_ssl?: boolean; + } + "resources/databases/models/sql_mode.yml": { + /** + * @description A string specifying the configured SQL modes for the MySQL cluster. + * @example ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES + */ + sql_mode: string; + } + "resources/databases/models/timescaledb.yml": { + /** + * @description The number of background workers for timescaledb operations. Set to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. + * @example 8 + */ + max_background_workers?: number; + } + "resources/databases/parameters.yml": string + "resources/databases/responses/ca.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + ca: external["resources/databases/models/ca.yml"]; + }; + }; + } + "resources/databases/responses/connection_pool.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + pool: external["resources/databases/models/connection_pool.yml"]; + }; + }; + } + "resources/databases/responses/connection_pools.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/databases/models/connection_pools.yml"]; + }; + } + "resources/databases/responses/database_backups.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + backups: (external["resources/databases/models/backup.yml"])[]; + }; + }; + } + "resources/databases/responses/database_cluster.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + database: external["resources/databases/models/database_cluster.yml"]; + }; + }; + } + "resources/databases/responses/database_clusters.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + databases?: (external["resources/databases/models/database_cluster.yml"])[]; + }; + }; + } + "resources/databases/responses/database_config.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + config: external["resources/databases/models/mysql.yml"] | external["resources/databases/models/postgres.yml"] | external["resources/databases/models/redis.yml"]; + }; + }; + } + "resources/databases/responses/database_replica.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + replica?: external["resources/databases/models/database_replica.yml"]; + }; + }; + } + "resources/databases/responses/database_replicas.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + replicas?: (external["resources/databases/models/database_replica.yml"])[]; + }; + }; + } + "resources/databases/responses/database.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + db: external["resources/databases/models/database.yml"]; + }; + }; + } + "resources/databases/responses/databases.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + dbs?: (external["resources/databases/models/database.yml"])[]; + }; + }; + } + "resources/databases/responses/eviction_policy_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + eviction_policy: external["resources/databases/models/eviction_policy_model.yml"]; + }; + }; + } + "resources/databases/responses/firewall_rules.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + rules?: (external["resources/databases/models/firewall_rule.yml"])[]; + }; + }; + } + "resources/databases/responses/online_migration.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/databases/models/online_migration.yml"]; + }; + } + "resources/databases/responses/options.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/databases/models/options.yml"]; + }; + } + "resources/databases/responses/sql_mode.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/databases/models/sql_mode.yml"]; + }; + } + "resources/databases/responses/user.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + user: external["resources/databases/models/database_user.yml"]; + }; + }; + } + "resources/databases/responses/users.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + users?: (external["resources/databases/models/database_user.yml"])[]; + }; + }; + } + "resources/domains/domains_create_record.yml": { + /** + * Create a New Domain Record + * @description To create a new record to a domain, send a POST request to + * `/v2/domains/$DOMAIN_NAME/records`. + * + * The request must include all of the required fields for the domain record type + * being added. + * + * See the [attribute table](#tag/Domain-Records) for details regarding record + * types and their respective required attributes. + */ + requestBody?: { + content: { + /** + * @example { + * "type": "A", + * "name": "www", + * "data": "162.10.66.0", + * "priority": null, + * "port": null, + * "ttl": 1800, + * "weight": null, + * "flags": null, + * "tag": null + * } + */ + "application/json": external["resources/domains/models/domain_record_types.yml"]["domain_record_a"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_aaaa"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_caa"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_cname"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_mx"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_ns"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_soa"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_srv"] | external["resources/domains/models/domain_record_types.yml"]["domain_record_txt"]; + }; + }; + responses: { + 201: external["resources/domains/responses/created_domain_record.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_create.yml": { + /** + * Create a New Domain + * @description To create a new domain, send a POST request to `/v2/domains`. Set the "name" + * attribute to the domain name you are adding. Optionally, you may set the + * "ip_address" attribute, and an A record will be automatically created pointing + * to the apex domain. + */ + requestBody?: { + content: { + /** + * @example { + * "name": "example.com" + * } + */ + "application/json": external["resources/domains/models/domain.yml"]; + }; + }; + responses: { + 201: external["resources/domains/responses/create_domain_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_delete_record.yml": { + /** + * Delete a Domain Record + * @description To delete a record for a domain, send a DELETE request to + * `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. + * + * The record will be deleted and the response status will be a 204. This + * indicates a successful request with no body returned. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_delete.yml": { + /** + * Delete a Domain + * @description To delete a domain, send a DELETE request to `/v2/domains/$DOMAIN_NAME`. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_get_record.yml": { + /** + * Retrieve an Existing Domain Record + * @description To retrieve a specific domain record, send a GET request to `/v2/domains/$DOMAIN_NAME/records/$RECORD_ID`. + */ + responses: { + 200: external["resources/domains/responses/domain_record.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_get.yml": { + /** + * Retrieve an Existing Domain + * @description To get details about a specific domain, send a GET request to `/v2/domains/$DOMAIN_NAME`. + */ + responses: { + 200: external["resources/domains/responses/existing_domain.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_list_records.yml": { + /** + * List All Domain Records + * @description To get a listing of all records configured for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records`. + * The list of records returned can be filtered by using the `name` and `type` query parameters. For example, to only include A records for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records?type=A`. `name` must be a fully qualified record name. For example, to only include records matching `sub.example.com`, send a GET request to `/v2/domains/$DOMAIN_NAME/records?name=sub.example.com`. Both name and type may be used together. + */ + responses: { + 200: external["resources/domains/responses/all_domain_records_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_list.yml": { + /** + * List All Domains + * @description To retrieve a list of all of the domains in your account, send a GET request to `/v2/domains`. + */ + responses: { + 200: external["resources/domains/responses/all_domains_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_patch_record.yml": { + /** + * Update a Domain Record + * @description To update an existing record, send a PATCH request to + * `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for + * the record type can be set to a new value for the record. + * + * See the [attribute table](#tag/Domain-Records) for details regarding record + * types and their respective attributes. + */ + requestBody?: { + content: { + /** + * @example { + * "name": "blog", + * "type": "A" + * } + */ + "application/json": external["resources/domains/models/domain_record.yml"]; + }; + }; + responses: { + 200: external["resources/domains/responses/domain_record.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/domains_update_record.yml": { + /** + * Update a Domain Record + * @description To update an existing record, send a PUT request to + * `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for + * the record type can be set to a new value for the record. + * + * See the [attribute table](#tag/Domain-Records) for details regarding record + * types and their respective attributes. + */ + requestBody?: { + content: { + /** + * @example { + * "name": "blog", + * "type": "CNAME" + * } + */ + "application/json": external["resources/domains/models/domain_record.yml"]; + }; + }; + responses: { + 200: external["resources/domains/responses/domain_record.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/domains/examples.yml": unknown + "resources/domains/models/domain_record_types.yml": Record + "resources/domains/models/domain_record.yml": { + /** + * @description A unique identifier for each domain record. + * @example 28448429 + */ + id?: number; + /** + * @description The type of the DNS record. For example: A, CNAME, TXT, ... + * @example NS + */ + type: string; + /** + * @description The host name, alias, or service being defined by the record. + * @example @ + */ + name?: string; + /** + * @description Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. + * @example ns1.digitalocean.com + */ + data?: string; + /** + * @description The priority for SRV and MX records. + * @example null + */ + priority?: number; + /** + * @description The port for SRV records. + * @example null + */ + port?: number; + /** + * @description This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. + * @example 1800 + */ + ttl?: number; + /** + * @description The weight for SRV records. + * @example null + */ + weight?: number; + /** + * @description An unsigned integer between 0-255 used for CAA records. + * @example null + */ + flags?: number; + /** + * @description The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" + * @example null + */ + tag?: string; + } + "resources/domains/models/domain.yml": { + /** + * @description The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, `example.com` is a valid domain name. + * @example example.com + */ + name?: string; + /** + * @description This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. + * @example 192.0.2.1 + */ + ip_address?: string; + /** + * @description This value is the time to live for the records on this domain, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. + * @example 1800 + */ + ttl?: number; + /** + * @description This attribute contains the complete contents of the zone file for the selected domain. Individual domain record resources should be used to get more granular control over records. However, this attribute can also be used to get information about the SOA record, which is created automatically and is not accessible as an individual record resource. + * @example $ORIGIN example.com. + * $TTL 1800 + * example.com. IN SOA ns1.digitalocean.com. hostmaster.example.com. 1415982609 10800 3600 604800 1800 + * example.com. 1800 IN NS ns1.digitalocean.com. + * example.com. 1800 IN NS ns2.digitalocean.com. + * example.com. 1800 IN NS ns3.digitalocean.com. + * example.com. 1800 IN A 1.2.3.4 + */ + zone_file?: string; + } + "resources/domains/parameters.yml": string + "resources/domains/responses/all_domain_records_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + domain_records?: (external["resources/domains/models/domain_record.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/domains/responses/all_domains_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + /** @description Array of volumes. */ + domains: (external["resources/domains/models/domain.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/domains/responses/create_domain_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + domain?: external["resources/domains/models/domain.yml"]; + }; + }; + } + "resources/domains/responses/created_domain_record.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + domain_record?: external["resources/domains/models/domain_record.yml"]; + }; + }; + } + "resources/domains/responses/domain_record.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + domain_record?: external["resources/domains/models/domain_record.yml"]; + }; + }; + } + "resources/domains/responses/existing_domain.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + domain?: external["resources/domains/models/domain.yml"]; + }; + }; + } + "resources/droplets/dropletActions_get.yml": { + /** + * Retrieve a Droplet Action + * @description To retrieve a Droplet action, send a GET request to + * `/v2/droplets/$DROPLET_ID/actions/$ACTION_ID`. + * + * The response will be a JSON object with a key called `action`. The value will + * be a Droplet action object. + */ + responses: { + 200: external["resources/actions/responses/action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/dropletActions_list.yml": { + /** + * List Actions for a Droplet + * @description To retrieve a list of all actions that have been executed for a Droplet, send + * a GET request to `/v2/droplets/$DROPLET_ID/actions`. + * + * The results will be returned as a JSON object with an `actions` key. This will + * be set to an array filled with `action` objects containing the standard + * `action` attributes. + */ + responses: { + 200: external["resources/droplets/responses/all_droplet_actions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/dropletActions_post_byTag.yml": { + /** + * Acting on Tagged Droplets + * @description Some actions can be performed in bulk on tagged Droplets. The actions can be + * initiated by sending a POST to `/v2/droplets/actions?tag_name=$TAG_NAME` with + * the action arguments. + * + * Only a sub-set of action types are supported: + * + * - `power_cycle` + * - `power_on` + * - `power_off` + * - `shutdown` + * - `enable_ipv6` + * - `enable_backups` + * - `disable_backups` + * - `snapshot` + */ + /** + * @description The `type` attribute set in the request body will specify the action that + * will be taken on the Droplet. Some actions will require additional + * attributes to be set as well. + */ + requestBody?: { + content: { + "application/json": external["resources/droplets/models/droplet_actions.yml"]["droplet_action"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_snapshot"]; + }; + }; + responses: { + 201: external["resources/droplets/responses/droplet_actions_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/dropletActions_post.yml": { + /** + * Initiate a Droplet Action + * @description To initiate an action on a Droplet send a POST request to + * `/v2/droplets/$DROPLET_ID/actions`. In the JSON body to the request, + * set the `type` attribute to on of the supported action types: + * + * | Action | Details | + * | ---------------------------------------- | ----------- | + * | `enable_backups` | Enables backups for a Droplet | + * | `disable_backups` | Disables backups for a Droplet | + * | `reboot` | Reboots a Droplet. A `reboot` action is an attempt to reboot the Droplet in a graceful way, similar to using the `reboot` command from the console. | + * | `power_cycle` | Power cycles a Droplet. A `powercycle` action is similar to pushing the reset button on a physical machine, it's similar to booting from scratch. | + * | `shutdown` | Shutsdown a Droplet. A shutdown action is an attempt to shutdown the Droplet in a graceful way, similar to using the `shutdown` command from the console. Since a `shutdown` command can fail, this action guarantees that the command is issued, not that it succeeds. The preferred way to turn off a Droplet is to attempt a shutdown, with a reasonable timeout, followed by a `power_off` action to ensure the Droplet is off. | + * | `power_off` | Powers off a Droplet. A `power_off` event is a hard shutdown and should only be used if the `shutdown` action is not successful. It is similar to cutting the power on a server and could lead to complications. | + * | `power_on` | Powers on a Droplet. | + * | `restore` | Restore a Droplet using a backup image. The image ID that is passed in must be a backup of the current Droplet instance. The operation will leave any embedded SSH keys intact. | + * | `password_reset` | Resets the root password for a Droplet. A new password will be provided via email. It must be changed after first use. | + * | `resize` | Resizes a Droplet. Set the `size` attribute to a size slug. If a permanent resize with disk changes included is desired, set the `disk` attribute to `true`. | + * | `rebuild` | Rebuilds a Droplet from a new base image. Set the `image` attribute to an image ID or slug. | + * | `rename` | Renames a Droplet. | + * | `change_kernel` | Changes a Droplet's kernel. Only applies to Droplets with externally managed kernels. All Droplets created after March 2017 use internal kernels by default. | + * | `enable_ipv6` | Enables IPv6 for a Droplet. | + * | `snapshot` | Takes a snapshot of a Droplet. | + */ + /** + * @description The `type` attribute set in the request body will specify the action that + * will be taken on the Droplet. Some actions will require additional + * attributes to be set as well. + */ + requestBody?: { + content: { + "application/json": external["resources/droplets/models/droplet_actions.yml"]["droplet_action"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_restore"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_resize"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_rebuild"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_rename"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_change_kernel"] | external["resources/droplets/models/droplet_actions.yml"]["droplet_action_snapshot"]; + }; + }; + responses: { + 201: external["resources/droplets/responses/droplet_action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_create.yml": { + /** + * Create a New Droplet + * @description To create a new Droplet, send a POST request to `/v2/droplets` setting the + * required attributes. + * + * A Droplet will be created using the provided information. The response body + * will contain a JSON object with a key called `droplet`. The value will be an + * object containing the standard attributes for your new Droplet. The response + * code, 202 Accepted, does not indicate the success or failure of the operation, + * just that the request has been accepted for processing. The `actions` returned + * as part of the response's `links` object can be used to check the status + * of the Droplet create event. + * + * ### Create Multiple Droplets + * + * Creating multiple Droplets is very similar to creating a single Droplet. + * Instead of sending `name` as a string, send `names` as an array of strings. A + * Droplet will be created for each name you send using the associated + * information. Up to ten Droplets may be created this way at a time. + * + * Rather than returning a single Droplet, the response body will contain a JSON + * array with a key called `droplets`. This will be set to an array of JSON + * objects, each of which will contain the standard Droplet attributes. The + * response code, 202 Accepted, does not indicate the success or failure of any + * operation, just that the request has been accepted for processing. The array + * of `actions` returned as part of the response's `links` object can be used to + * check the status of each individual Droplet create event. + */ + requestBody?: { + content: { + "application/json": external["resources/droplets/models/droplet_single_create.yml"] | external["resources/droplets/models/droplet_multi_create.yml"]; + }; + }; + responses: { + 202: external["resources/droplets/responses/droplet_create.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_destroy_byTag.yml": { + /** + * Deleting Droplets by Tag + * @description To delete **all** Droplets assigned to a specific tag, include the `tag_name` + * query parameter set to the name of the tag in your DELETE request. For + * example, `/v2/droplets?tag_name=$TAG_NAME`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content_with_content_type.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_destroy_retryWithAssociatedResources.yml": { + /** + * Retry a Droplet Destroy with Associated Resources Request + * @description If the status of a request to destroy a Droplet with its associated resources + * reported any errors, it can be retried by sending a POST request to the + * `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/retry` endpoint. + * + * Only one destroy can be active at a time per Droplet. If a retry is issued + * while another destroy is in progress for the Droplet a 409 status code will + * be returned. A successful response will include a 202 response code and no + * content. + */ + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 409: external["shared/responses/conflict.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_destroy_withAssociatedResourcesDangerous.yml": { + /** + * Destroy a Droplet and All of its Associated Resources (Dangerous) + * @description To destroy a Droplet along with all of its associated resources, send a DELETE + * request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous` + * endpoint. The headers of this request must include an `X-Dangerous` key set to + * `true`. To preview which resources will be destroyed, first query the + * Droplet's associated resources. This operation _can not_ be reverse and should + * be used with caution. + * + * A successful response will include a 202 response code and no content. Use the + * status endpoint to check on the success or failure of the destruction of the + * individual resources. + */ + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_destroy_withAssociatedResourcesSelective.yml": { + /** + * Selectively Destroy a Droplet and its Associated Resources + * @description To destroy a Droplet along with a sub-set of its associated resources, send a + * DELETE request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective` + * endpoint. The JSON body of the request should include `reserved_ips`, `snapshots`, `volumes`, + * or `volume_snapshots` keys each set to an array of IDs for the associated + * resources to be destroyed. The IDs can be found by querying the Droplet's + * associated resources. Any associated resource not included in the request + * will remain and continue to accrue changes on your account. + * + * A successful response will include a 202 response code and no content. Use + * the status endpoint to check on the success or failure of the destruction of + * the individual resources. + */ + requestBody?: { + content: { + "application/json": external["resources/droplets/models/selective_destroy_associated_resource.yml"]; + }; + }; + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_destroy.yml": { + /** + * Delete an Existing Droplet + * @description To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content_with_content_type.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_get_destroyAssociatedResourcesStatus.yml": { + /** + * Check Status of a Droplet Destroy with Associated Resources Request + * @description To check on the status of a request to destroy a Droplet with its associated + * resources, send a GET request to the + * `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/status` endpoint. + */ + responses: { + 200: external["resources/droplets/responses/associated_resources_status.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_get.yml": { + /** + * Retrieve an Existing Droplet + * @description To show information about an individual Droplet, send a GET request to + * `/v2/droplets/$DROPLET_ID`. + */ + responses: { + 200: external["resources/droplets/responses/existing_droplet.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_associatedResources.yml": { + /** + * List Associated Resources for a Droplet + * @description To list the associated billable resources that can be destroyed along with a + * Droplet, send a GET request to the + * `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources` endpoint. + * + * The response will be a JSON object containing `snapshots`, `volumes`, and + * `volume_snapshots` keys. Each will be set to an array of objects containing + * information about the associated resources. + */ + responses: { + 200: external["resources/droplets/responses/associated_resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_backups.yml": { + /** + * List Backups for a Droplet + * @description To retrieve any backups associated with a Droplet, send a GET request to + * `/v2/droplets/$DROPLET_ID/backups`. + * + * You will get back a JSON object that has a `backups` key. This will be set to + * an array of backup objects, each of which contain the standard + * Droplet backup attributes. + */ + responses: { + 200: external["resources/droplets/responses/all_droplet_backups.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_firewalls.yml": { + /** + * List all Firewalls Applied to a Droplet + * @description To retrieve a list of all firewalls available to a Droplet, send a GET request + * to `/v2/droplets/$DROPLET_ID/firewalls` + * + * The response will be a JSON object that has a key called `firewalls`. This will + * be set to an array of `firewall` objects, each of which contain the standard + * `firewall` attributes. + */ + responses: { + 200: external["resources/droplets/responses/all_firewalls.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_kernels.yml": { + /** + * List All Available Kernels for a Droplet + * @description To retrieve a list of all kernels available to a Droplet, send a GET request + * to `/v2/droplets/$DROPLET_ID/kernels` + * + * The response will be a JSON object that has a key called `kernels`. This will + * be set to an array of `kernel` objects, each of which contain the standard + * `kernel` attributes. + */ + responses: { + 200: external["resources/droplets/responses/all_kernels.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_neighbors.yml": { + /** + * List Neighbors for a Droplet + * @description To retrieve a list of any "neighbors" (i.e. Droplets that are co-located on + * the same physical hardware) for a specific Droplet, send a GET request to + * `/v2/droplets/$DROPLET_ID/neighbors`. + * + * The results will be returned as a JSON object with a key of `droplets`. This + * will be set to an array containing objects representing any other Droplets + * that share the same physical hardware. An empty array indicates that the + * Droplet is not co-located any other Droplets associated with your account. + */ + responses: { + 200: external["resources/droplets/responses/neighbor_droplets.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_neighborsIds.yml": { + /** + * List All Droplet Neighbors + * @description To retrieve a list of all Droplets that are co-located on the same physical + * hardware, send a GET request to `/v2/reports/droplet_neighbors_ids`. + * + * The results will be returned as a JSON object with a key of `neighbor_ids`. + * This will be set to an array of arrays. Each array will contain a set of + * Droplet IDs for Droplets that share a physical server. An empty array + * indicates that all Droplets associated with your account are located on + * separate physical hardware. + */ + responses: { + 200: external["resources/droplets/responses/droplet_neighbors_ids.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list_snapshots.yml": { + /** + * List Snapshots for a Droplet + * @description To retrieve the snapshots that have been created from a Droplet, send a GET + * request to `/v2/droplets/$DROPLET_ID/snapshots`. + * + * You will get back a JSON object that has a `snapshots` key. This will be set + * to an array of snapshot objects, each of which contain the standard Droplet + * snapshot attributes. + */ + responses: { + 200: external["resources/droplets/responses/all_droplet_snapshots.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/droplets_list.yml": { + /** + * List All Droplets + * @description To list all Droplets in your account, send a GET request to `/v2/droplets`. + * + * The response body will be a JSON object with a key of `droplets`. This will be + * set to an array containing objects each representing a Droplet. These will + * contain the standard Droplet attributes. + * + * ### Filtering Results by Tag + * + * It's possible to request filtered results by including certain query parameters. + * To only list Droplets assigned to a specific tag, include the `tag_name` query + * parameter set to the name of the tag in your GET request. For example, + * `/v2/droplets?tag_name=$TAG_NAME`. + */ + responses: { + 200: external["resources/droplets/responses/all_droplets.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/droplets/examples.yml": unknown + "resources/droplets/models/associated_resource_status.yml": { + droplet?: external["resources/droplets/models/destroyed_associated_resource.yml"]; + /** @description An object containing additional information about resource related to a Droplet requested to be destroyed. */ + resources?: { + reserved_ips?: (external["resources/droplets/models/destroyed_associated_resource.yml"])[]; + floating_ips?: (external["resources/droplets/models/destroyed_associated_resource.yml"])[]; + snapshots?: (external["resources/droplets/models/destroyed_associated_resource.yml"])[]; + volumes?: (external["resources/droplets/models/destroyed_associated_resource.yml"])[]; + volume_snapshots?: (external["resources/droplets/models/destroyed_associated_resource.yml"])[]; + }; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format indicating when the requested action was completed. + * @example "2020-04-01T18:11:49.000Z" + */ + completed_at?: string; + /** + * @description A count of the associated resources that failed to be destroyed, if any. + * @example 0 + */ + failures?: number; + } + "resources/droplets/models/associated_resource.yml": { + /** + * @description The unique identifier for the resource associated with the Droplet. + * @example 61486916 + */ + id?: string; + /** + * @description The name of the resource associated with the Droplet. + * @example ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330 + */ + name?: string; + /** + * @description The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. + * @example 0.05 + */ + cost?: string; + } + "resources/droplets/models/destroyed_associated_resource.yml": { + /** + * @description The unique identifier for the resource scheduled for deletion. + * @example 61486916 + */ + id?: string; + /** + * @description The name of the resource scheduled for deletion. + * @example ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330 + */ + name?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. + * @example "2020-04-01T18:11:49.000Z" + */ + destroyed_at?: string; + /** + * @description A string indicating that the resource was not successfully destroyed and providing additional information. + * @example + */ + error_message?: string; + } + "resources/droplets/models/droplet_actions.yml": Record + "resources/droplets/models/droplet_create.yml": { + /** + * @description The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g. `nyc`) can be used to deploy the Droplet in any of the that region's locations (`nyc1`, `nyc2`, or `nyc3`). If the region is omitted from the create request completely, the Droplet may deploy in any region. + * @example nyc3 + */ + region?: string; + /** + * @description The slug identifier for the size that you wish to select for this Droplet. + * @example s-1vcpu-1gb + */ + size: string; + /** + * @description The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet. + * @example ubuntu-20-04-x64 + */ + image: string | number; + /** + * @description An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. + * @default [] + * @example [ + * 289794, + * "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" + * ] + */ + ssh_keys?: (string | number)[]; + /** + * @description A boolean indicating whether automated backups should be enabled for the Droplet. + * @default false + * @example true + */ + backups?: boolean; + /** + * @description A boolean indicating whether to enable IPv6 on the Droplet. + * @default false + * @example true + */ + ipv6?: boolean; + /** + * @description A boolean indicating whether to install the DigitalOcean agent for monitoring. + * @default false + * @example true + */ + monitoring?: boolean; + /** + * @description A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags. + * @default [] + * @example [ + * "env:prod", + * "web" + * ] + */ + tags?: (string)[]; + /** + * @description A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size. + * @example #cloud-config + * runcmd: + * - touch /test.txt + */ + user_data?: string; + /** + * @deprecated + * @description This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. + * @default false + * @example true + */ + private_networking?: boolean; + /** + * @description A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region. + * @example 760e09ef-dc84-11e8-981e-3cfdfeaae000 + */ + vpc_uuid?: string; + /** + * @description A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to `false`. To make installation errors fatal, explicitly set it to `true`. + * @example true + */ + with_droplet_agent?: boolean; + } + "resources/droplets/models/droplet_multi_create.yml": { + /** + * @description An array of human human-readable strings you wish to use when displaying the Droplet name. Each name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. Each name set during creation will also determine the hostname for the Droplet in its internal configuration. + * @example [ + * "sub-01.example.com", + * "sub-02.example.com" + * ] + */ + names: (string)[]; + } & external["resources/droplets/models/droplet_create.yml"] + "resources/droplets/models/droplet_single_create.yml": { + /** + * @description The human-readable string you wish to use when displaying the Droplet name. The name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. The name set during creation will also determine the hostname for the Droplet in its internal configuration. + * @example example.com + */ + name: string; + } & external["resources/droplets/models/droplet_create.yml"] + "resources/droplets/models/droplet_snapshot.yml": { + /** + * @description The unique identifier for the snapshot or backup. + * @example 6372321 + */ + id: number; + } & external["resources/snapshots/models/snapshots_base.yml"] & ({ + /** + * @description Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. + * @example snapshot + * @enum {string} + */ + type: "snapshot" | "backup"; + }) + "resources/droplets/models/droplet.yml": { + /** + * @description A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. + * @example 3164444 + */ + id: number; + /** + * @description The human-readable name set for the Droplet instance. + * @example example.com + */ + name: string; + /** + * @description Memory of the Droplet in megabytes. + * @example 1024 + */ + memory: number; + /** + * @description The number of virtual CPUs. + * @example 1 + */ + vcpus: number; + /** + * @description The size of the Droplet's disk in gigabytes. + * @example 25 + */ + disk: number; + /** + * @description A boolean value indicating whether the Droplet has been locked, preventing actions by users. + * @example false + */ + locked: boolean; + /** + * @description A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". + * @example active + * @enum {string} + */ + status: "new" | "active" | "off" | "archive"; + kernel?: external["resources/droplets/models/kernel.yml"]; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the Droplet was created. + * @example 2020-07-21T18:37:44Z + */ + created_at: string; + /** + * @description An array of features enabled on this Droplet. + * @example [ + * "backups", + * "private_networking", + * "ipv6" + * ] + */ + features: (string)[]; + /** + * @description An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. + * @example [ + * 53893572 + * ] + */ + backup_ids: (number)[]; + /** @description The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start. */ + next_backup_window: { + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format specifying the start of the Droplet's backup window. + * @example 2019-12-04T00:00:00Z + */ + start?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format specifying the end of the Droplet's backup window. + * @example 2019-12-04T23:00:00Z + */ + end?: string; + } | null; + /** + * @description An array of snapshot IDs of any snapshots created from the Droplet instance. + * @example [ + * 67512819 + * ] + */ + snapshot_ids: (number)[]; + image: external["resources/images/models/image.yml"]; + /** + * @description A flat array including the unique identifier for each Block Storage volume attached to the Droplet. + * @example [ + * "506f78a4-e098-11e5-ad9f-000f53306ae1" + * ] + */ + volume_ids: (string)[]; + size: external["resources/sizes/models/size.yml"]; + /** + * @description The unique slug identifier for the size of this Droplet. + * @example s-1vcpu-1gb + */ + size_slug: string; + /** @description The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. */ + networks: { + v4?: (external["resources/droplets/models/network_v4.yml"])[]; + v6?: (external["resources/droplets/models/network_v6.yml"])[]; + }; + region: external["resources/regions/models/region.yml"]; + /** + * @description An array of Tags the Droplet has been tagged with. + * @example [ + * "web", + * "env:prod" + * ] + */ + tags: (string)[]; + /** + * @description A string specifying the UUID of the VPC to which the Droplet is assigned. + * @example 760e09ef-dc84-11e8-981e-3cfdfeaae000 + */ + vpc_uuid?: string; + } + "resources/droplets/models/kernel.yml": { + /** + * @description A unique number used to identify and reference a specific kernel. + * @example 7515 + */ + id?: number; + /** + * @description The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. + * @example DigitalOcean GrubLoader v0.2 (20160714) + */ + name?: string; + /** + * @description A standard kernel version string representing the version, patch, and release information. + * @example 2016.07.13-DigitalOcean_loader_Ubuntu + */ + version?: string; + } | null + "resources/droplets/models/neighbor_ids.yml": { + /** + * @description An array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server. + * @example [ + * [ + * 168671828, + * 168663509, + * 168671815 + * ], + * [ + * 168671883, + * 168671750 + * ] + * ] + */ + neighbor_ids?: ((number)[])[]; + } + "resources/droplets/models/network_v4.yml": { + /** + * Format: ipv4 + * @description The IP address of the IPv4 network interface. + * @example 104.236.32.182 + */ + ip_address?: string; + /** + * Format: ipv4 + * @description The netmask of the IPv4 network interface. + * @example 255.255.192.0 + */ + netmask?: string; + /** + * @description The gateway of the specified IPv4 network interface. + * + * For private interfaces, a gateway is not provided. This is denoted by + * returning `nil` as its value. + * + * @example 104.236.0.1 + */ + gateway?: string; + /** + * @description The type of the IPv4 network interface. + * @example public + * @enum {string} + */ + type?: "public" | "private"; + } + "resources/droplets/models/network_v6.yml": { + /** + * Format: ipv6 + * @description The IP address of the IPv6 network interface. + * @example 2604:a880:0:1010::18a:a001 + */ + ip_address?: string; + /** + * @description The netmask of the IPv6 network interface. + * @example 64 + */ + netmask?: number; + /** + * Format: ipv6 + * @description The gateway of the specified IPv6 network interface. + * @example 2604:a880:0:1010::1 + */ + gateway?: string; + /** + * @description The type of the IPv6 network interface. + * + * **Note**: IPv6 private networking is not currently supported. + * + * @example public + * @enum {string} + */ + type?: "public"; + } + "resources/droplets/models/selective_destroy_associated_resource.yml": { + /** + * @deprecated + * @description An array of unique identifiers for the floating IPs to be scheduled for deletion. + * @example [ + * "6186916" + * ] + */ + floating_ips?: (string)[]; + /** + * @description An array of unique identifiers for the reserved IPs to be scheduled for deletion. + * @example [ + * "6186916" + * ] + */ + reserved_ips?: (string)[]; + /** + * @description An array of unique identifiers for the snapshots to be scheduled for deletion. + * @example [ + * "61486916" + * ] + */ + snapshots?: (string)[]; + /** + * @description An array of unique identifiers for the volumes to be scheduled for deletion. + * @example [ + * "ba49449a-7435-11ea-b89e-0a58ac14480f" + * ] + */ + volumes?: (string)[]; + /** + * @description An array of unique identifiers for the volume snapshots to be scheduled for deletion. + * @example [ + * "edb0478d-7436-11ea-86e6-0a58ac144b91" + * ] + */ + volume_snapshots?: (string)[]; + } + "resources/droplets/parameters.yml": string + "resources/droplets/responses/all_droplet_actions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/all_droplet_backups.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + backups?: (external["resources/droplets/models/droplet_snapshot.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/all_droplet_snapshots.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + snapshots?: (external["resources/droplets/models/droplet_snapshot.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/all_droplets.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + droplets?: (external["resources/droplets/models/droplet.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/all_firewalls.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + firewalls?: (external["resources/firewalls/models/firewall.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/all_kernels.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + kernels?: (external["resources/droplets/models/kernel.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/droplets/responses/associated_resources_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + reserved_ips?: (external["resources/droplets/models/associated_resource.yml"])[]; + floating_ips?: (external["resources/droplets/models/associated_resource.yml"])[]; + snapshots?: (external["resources/droplets/models/associated_resource.yml"])[]; + volumes?: (external["resources/droplets/models/associated_resource.yml"])[]; + volume_snapshots?: (external["resources/droplets/models/associated_resource.yml"])[]; + }; + }; + } + "resources/droplets/responses/associated_resources_status.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/droplets/models/associated_resource_status.yml"]; + }; + } + "resources/droplets/responses/droplet_action.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + action?: external["resources/actions/models/action.yml"]; + }; + }; + } + "resources/droplets/responses/droplet_actions_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + }; + }; + } + "resources/droplets/responses/droplet_create.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": OneOf<[{ + droplet: external["resources/droplets/models/droplet.yml"]; + links: { + actions?: (external["shared/models/action_link.yml"])[]; + }; + }, { + droplets: (external["resources/droplets/models/droplet.yml"])[]; + links: { + actions?: (external["shared/models/action_link.yml"])[]; + }; + }]>; + }; + } + "resources/droplets/responses/droplet_neighbors_ids.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/droplets/models/neighbor_ids.yml"]; + }; + } + "resources/droplets/responses/examples.yml": unknown + "resources/droplets/responses/existing_droplet.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + droplet?: external["resources/droplets/models/droplet.yml"]; + }; + }; + } + "resources/droplets/responses/neighbor_droplets.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + droplets?: (external["resources/droplets/models/droplet.yml"])[]; + }; + }; + } + "resources/firewalls/firewalls_add_rules.yml": { + /** + * Add Rules to a Firewall + * @description To add additional access rules to a firewall, send a POST request to + * `/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an + * inbound_rules and/or outbound_rules attribute containing an array of rules to + * be added. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "inbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "3306", + * "sources": { + * "droplet_ids": [ + * 49696269 + * ] + * } + * } + * ], + * "outbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "3306", + * "destinations": { + * "droplet_ids": [ + * 49696269 + * ] + * } + * } + * ] + * } + */ + "application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"] & (Record | Record); + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_add_tags.yml": { + /** + * Add Tags to a Firewall + * @description To assign a tag representing a group of Droplets to a firewall, send a POST + * request to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the request, + * there should be a `tags` attribute containing a list of tag names. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "tags": [ + * "frontend" + * ] + * } + */ + "application/json": { + tags: external["shared/attributes/tags_array.yml"] & Record; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_assign_droplets.yml": { + /** + * Add Droplets to a Firewall + * @description To assign a Droplet to a firewall, send a POST request to + * `/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there + * should be a `droplet_ids` attribute containing a list of Droplet IDs. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "droplet_ids": [ + * 49696269 + * ] + * } + */ + "application/json": { + /** + * @description An array containing the IDs of the Droplets to be assigned to the firewall. + * @example [ + * 49696269 + * ] + */ + droplet_ids: (number)[]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_create.yml": { + /** + * Create a New Firewall + * @description To create a new firewall, send a POST request to `/v2/firewalls`. The request + * must contain at least one inbound or outbound access rule. + */ + requestBody?: { + content: { + /** + * @example { + * "name": "firewall", + * "inbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "80", + * "sources": { + * "load_balancer_uids": [ + * "4de7ac8b-495b-4884-9a69-1050c6793cd6" + * ] + * } + * }, + * { + * "protocol": "tcp", + * "ports": "22", + * "sources": { + * "tags": [ + * "gateway" + * ], + * "addresses": [ + * "18.0.0.0/8" + * ] + * } + * } + * ], + * "outbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "80", + * "destinations": { + * "addresses": [ + * "0.0.0.0/0", + * "::/0" + * ] + * } + * } + * ], + * "droplet_ids": [ + * 8043964 + * ] + * } + */ + "application/json": external["resources/firewalls/models/firewall.yml"] & Record & (Record | Record); + }; + }; + responses: { + 202: external["resources/firewalls/responses/create_firewall_response.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_delete_droplets.yml": { + /** + * Remove Droplets from a Firewall + * @description To remove a Droplet from a firewall, send a DELETE request to + * `/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there should + * be a `droplet_ids` attribute containing a list of Droplet IDs. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "droplet_ids": [ + * 49696269 + * ] + * } + */ + "application/json": { + /** + * @description An array containing the IDs of the Droplets to be removed from the firewall. + * @example [ + * 49696269 + * ] + */ + droplet_ids: (number)[]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_delete_rules.yml": { + /** + * Remove Rules from a Firewall + * @description To remove access rules from a firewall, send a DELETE request to + * `/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an + * `inbound_rules` and/or `outbound_rules` attribute containing an array of rules + * to be removed. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "inbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "3306", + * "sources": { + * "droplet_ids": [ + * 49696269 + * ] + * } + * } + * ], + * "outbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "3306", + * "destinations": { + * "droplet_ids": [ + * 49696269 + * ] + * } + * } + * ] + * } + */ + "application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"] & (Record | Record); + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_delete_tags.yml": { + /** + * Remove Tags from a Firewall + * @description To remove a tag representing a group of Droplets from a firewall, send a + * DELETE request to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the + * request, there should be a `tags` attribute containing a list of tag names. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody?: { + content: { + /** + * @example { + * "tags": [ + * "frontend" + * ] + * } + */ + "application/json": { + tags: external["shared/attributes/tags_array.yml"] & Record; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_delete.yml": { + /** + * Delete a Firewall + * @description To delete a firewall send a DELETE request to `/v2/firewalls/$FIREWALL_ID`. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_get.yml": { + /** + * Retrieve an Existing Firewall + * @description To show information about an existing firewall, send a GET request to `/v2/firewalls/$FIREWALL_ID`. + */ + responses: { + 200: external["resources/firewalls/responses/get_firewall_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_list.yml": { + /** + * List All Firewalls + * @description To list all of the firewalls available on your account, send a GET request to `/v2/firewalls`. + */ + responses: { + 200: external["resources/firewalls/responses/list_firewalls_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/firewalls_update.yml": { + /** + * Update a Firewall + * @description To update the configuration of an existing firewall, send a PUT request to + * `/v2/firewalls/$FIREWALL_ID`. The request should contain a full representation + * of the firewall including existing attributes. **Note that any attributes that + * are not provided will be reset to their default values.** + */ + requestBody?: { + content: { + /** + * @example { + * "name": "frontend-firewall", + * "inbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "8080", + * "sources": { + * "load_balancer_uids": [ + * "4de7ac8b-495b-4884-9a69-1050c6793cd6" + * ] + * } + * }, + * { + * "protocol": "tcp", + * "ports": "22", + * "sources": { + * "tags": [ + * "gateway" + * ], + * "addresses": [ + * "18.0.0.0/8" + * ] + * } + * } + * ], + * "outbound_rules": [ + * { + * "protocol": "tcp", + * "ports": "8080", + * "destinations": { + * "addresses": [ + * "0.0.0.0/0", + * "::/0" + * ] + * } + * } + * ], + * "droplet_ids": [ + * 8043964 + * ], + * "tags": [ + * "frontend" + * ] + * } + */ + "application/json": external["resources/firewalls/models/firewall.yml"] & (Record | Record); + }; + }; + responses: { + 200: external["resources/firewalls/responses/put_firewall_response.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/firewalls/models/firewall_rule.yml": Record + "resources/firewalls/models/firewall.yml": ({ + /** + * @description A unique ID that can be used to identify and reference a firewall. + * @example bb4b2611-3d72-467b-8602-280330ecd65c + */ + id?: string; + /** + * @description A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". + * @example waiting + * @enum {string} + */ + status?: "waiting" | "succeeded" | "failed"; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the firewall was created. + * @example 2020-05-23T21:24:00Z + */ + created_at?: string; + /** + * @description An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. + * @example [ + * { + * "droplet_id": 8043964, + * "removing": false, + * "status": "waiting" + * } + * ] + */ + pending_changes?: readonly ({ + /** @example 8043964 */ + droplet_id?: number; + /** @example false */ + removing?: boolean; + /** @example waiting */ + status?: string; + })[]; + /** + * @description A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). + * @example firewall + */ + name?: string; + /** + * @description An array containing the IDs of the Droplets assigned to the firewall. + * @example [ + * 8043964 + * ] + */ + droplet_ids?: (number)[]; + tags?: external["shared/attributes/tags_array.yml"] & Record; + }) & external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"] + "resources/firewalls/parameters.yml": string + "resources/firewalls/responses/create_firewall_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + firewall?: external["resources/firewalls/models/firewall.yml"]; + }; + }; + } + "resources/firewalls/responses/get_firewall_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + firewall?: external["resources/firewalls/models/firewall.yml"]; + }; + }; + } + "resources/firewalls/responses/list_firewalls_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + firewalls?: (external["resources/firewalls/models/firewall.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/firewalls/responses/put_firewall_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + firewall?: external["resources/firewalls/models/firewall.yml"]; + }; + }; + } + "resources/floating_ips/floatingIPs_create.yml": { + /** + * Create a New Floating IP + * @description On creation, a floating IP must be either assigned to a Droplet or reserved to a region. + * * To create a new floating IP assigned to a Droplet, send a POST + * request to `/v2/floating_ips` with the `droplet_id` attribute. + * + * * To create a new floating IP reserved to a region, send a POST request to + * `/v2/floating_ips` with the `region` attribute. + * + * **Note**: In addition to the standard rate limiting, only 12 floating IPs may be created per 60 seconds. + */ + requestBody: { + content: { + "application/json": external["resources/floating_ips/models/floating_ip_create.yml"]; + }; + }; + responses: { + 202: external["resources/floating_ips/responses/floating_ip_created.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPs_delete.yml": { + /** + * Delete a Floating IPs + * @description To delete a floating IP and remove it from your account, send a DELETE request + * to `/v2/floating_ips/$FLOATING_IP_ADDR`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPs_get.yml": { + /** + * Retrieve an Existing Floating IP + * @description To show information about a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP_ADDR`. + */ + responses: { + 200: external["resources/floating_ips/responses/floating_ip.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPs_list.yml": { + /** + * List All Floating IPs + * @description To list all of the floating IPs available on your account, send a GET request to `/v2/floating_ips`. + */ + responses: { + 200: external["resources/floating_ips/responses/floating_ip_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPsAction_get.yml": { + /** + * Retrieve an Existing Floating IP Action + * @description To retrieve the status of a floating IP action, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions/$ACTION_ID`. + */ + responses: { + 200: external["resources/floating_ips/responses/floating_ip_action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPsAction_list.yml": { + /** + * List All Actions for a Floating IP + * @description To retrieve all actions that have been executed on a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions`. + */ + responses: { + 200: external["resources/floating_ips/responses/floating_ip_actions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/floatingIPsAction_post.yml": { + /** + * Initiate a Floating IP Action + * @description To initiate an action on a floating IP send a POST request to + * `/v2/floating_ips/$FLOATING_IP/actions`. In the JSON body to the request, + * set the `type` attribute to on of the supported action types: + * + * | Action | Details + * |------------|-------- + * | `assign` | Assigns a floating IP to a Droplet + * | `unassign` | Unassign a floating IP from a Droplet + */ + /** + * @description The `type` attribute set in the request body will specify the action that + * will be taken on the floating IP. + */ + requestBody?: { + content: { + "application/json": external["resources/floating_ips/models/floating_ip_actions.yml"]["floating_ip_action_unassign"] | external["resources/floating_ips/models/floating_ip_actions.yml"]["floating_ip_action_assign"]; + }; + }; + responses: { + 201: external["resources/floating_ips/responses/floating_ip_action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/floating_ips/models/floating_ip_actions.yml": Record + "resources/floating_ips/models/floating_ip_create.yml": OneOf<[{ + /** + * @description The ID of the Droplet that the floating IP will be assigned to. + * @example 2457247 + */ + droplet_id: number; + }, { + /** + * @description The slug identifier for the region the floating IP will be reserved to. + * @example nyc3 + */ + region: string; + /** + * Format: uuid + * @description The UUID of the project to which the floating IP will be assigned. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + }]> + "resources/floating_ips/models/floating_ip.yml": { + /** + * Format: ipv4 + * @description The public IP address of the floating IP. It also serves as its identifier. + * @example 45.55.96.47 + */ + ip?: string; + region?: external["resources/regions/models/region.yml"] & Record; + /** + * @description The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null. + * @example null + */ + droplet?: (Record | null) | external["resources/droplets/models/droplet.yml"]; + /** + * @description A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted. + * @example true + */ + locked?: boolean; + /** + * Format: uuid + * @description The UUID of the project to which the reserved IP currently belongs. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + } + "resources/floating_ips/parameters.yml": string + "resources/floating_ips/responses/examples.yml": unknown + "resources/floating_ips/responses/floating_ip_action.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + action?: external["resources/actions/models/action.yml"] & { + /** + * Format: uuid + * @description The UUID of the project to which the reserved IP currently belongs. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + }; + }; + }; + } + "resources/floating_ips/responses/floating_ip_actions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/floating_ips/responses/floating_ip_created.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + floating_ip?: external["resources/floating_ips/models/floating_ip.yml"]; + links?: { + droplets?: (external["shared/models/action_link.yml"])[]; + actions?: (external["shared/models/action_link.yml"])[]; + }; + }; + }; + } + "resources/floating_ips/responses/floating_ip_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + floating_ips?: (external["resources/floating_ips/models/floating_ip.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/floating_ips/responses/floating_ip.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + floating_ip?: external["resources/floating_ips/models/floating_ip.yml"]; + }; + }; + } + "resources/functions/functions_create_namespace.yml": { + /** + * Create Namespace + * @description Creates a new serverless functions namespace in the desired region and associates it with the provided label. A namespace is a collection of functions and their associated packages, triggers, and project specifications. To create a namespace, send a POST request to `/v2/functions/namespaces` with the `region` and `label` properties. + */ + requestBody: { + content: { + "application/json": external["resources/functions/models/create_namespace.yml"]; + }; + }; + responses: { + 200: external["resources/functions/responses/namespace_created.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["resources/functions/responses/namespace_bad_request.yml"]; + 422: external["resources/functions/responses/namespace_limit_reached.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/functions/functions_delete_namespace.yml": { + /** + * Delete Namespace + * @description Deletes the given namespace. When a namespace is deleted all assets, in the namespace are deleted, this includes packages, functions and triggers. Deleting a namespace is a destructive operation and assets in the namespace are not recoverable after deletion. Some metadata is retained, such as activations, or soft deleted for reporting purposes. + * To delete namespace, send a DELETE request to `/v2/functions/namespaces/$NAMESPACE_ID`. + * A successful deletion returns a 204 response. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["resources/functions/responses/namespace_not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/functions/functions_get_namespace.yml": { + /** + * Get Namespace + * @description Gets the namespace details for the given namespace UUID. To get namespace details, send a GET request to `/v2/functions/namespaces/$NAMESPACE_ID` with no parameters. + */ + responses: { + 200: external["resources/functions/responses/namespace_created.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 403: external["resources/functions/responses/namespace_not_allowed.yml"]; + 404: external["resources/functions/responses/namespace_not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/functions/functions_list_namespaces.yml": { + /** + * List Namespaces + * @description Returns a list of namespaces associated with the current user. To get all namespaces, send a GET request to `/v2/functions/namespaces`. + */ + responses: { + 200: external["resources/functions/responses/list_namespaces.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/functions/models/create_namespace.yml": { + /** + * @description The [datacenter region](https://docs.digitalocean.com/products/platform/availability-matrix/#available-datacenters) in which to create the namespace. + * @example nyc1 + */ + region: string; + /** + * @description The namespace's unique name. + * @example my namespace + */ + label: string; + } + "resources/functions/models/namespace_info.yml": { + /** + * @description The namespace's API hostname. Each function in a namespace is provided an endpoint at the namespace's hostname. + * @example https://api_host.io + */ + api_host?: string; + /** + * @description A unique string format of UUID with a prefix fn-. + * @example fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + */ + namespace?: string; + /** + * @description UTC time string. + * @example "2022-09-14T04:16:45.000Z" + */ + created_at?: string; + /** + * @description UTC time string. + * @example "2022-09-14T04:16:45.000Z" + */ + updated_at?: string; + /** + * @description The namespace's unique name. + * @example my namespace + */ + label?: string; + /** + * @description The namespace's datacenter region. + * @example nyc1 + */ + region?: string; + /** + * @description The namespace's Universally Unique Identifier. + * @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + */ + uuid?: string; + /** + * @description A random alpha numeric string. This key is used in conjunction with the namespace's UUID to authenticate + * a user to use the namespace via `doctl`, DigitalOcean's official CLI. + * @example d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2 + */ + key?: string; + } + "resources/functions/parameters.yml": string + "resources/functions/responses/list_namespaces.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + namespaces?: (external["resources/functions/models/namespace_info.yml"])[]; + }; + }; + } + "resources/functions/responses/namespace_bad_request.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "resources/functions/responses/namespace_created.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + namespace?: external["resources/functions/models/namespace_info.yml"]; + }; + }; + } + "resources/functions/responses/namespace_limit_reached.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "resources/functions/responses/namespace_not_allowed.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "resources/functions/responses/namespace_not_found.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "resources/images/attributes.yml": Record + "resources/images/imageActions_get.yml": { + /** + * Retrieve an Existing Action + * @description To retrieve the status of an image action, send a GET request to `/v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID`. + */ + responses: { + 200: external["resources/images/responses/get_image_action_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/imageActions_list.yml": { + /** + * List All Actions for an Image + * @description To retrieve all actions that have been executed on an image, send a GET request to `/v2/images/$IMAGE_ID/actions`. + */ + responses: { + 200: external["resources/images/responses/get_image_actions_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/imageActions_post.yml": { + /** + * Initiate an Image Action + * @description The following actions are available on an Image. + * + * ## Convert an Image to a Snapshot + * + * To convert an image, for example, a backup to a snapshot, send a POST request + * to `/v2/images/$IMAGE_ID/actions`. Set the `type` attribute to `convert`. + * + * ## Transfer an Image + * + * To transfer an image to another region, send a POST request to + * `/v2/images/$IMAGE_ID/actions`. Set the `type` attribute to `transfer` and set + * `region` attribute to the slug identifier of the region you wish to transfer + * to. + */ + requestBody?: { + content: { + "application/json": external["resources/images/models/image_action.yml"]["image_action_base"] | external["resources/images/models/image_action.yml"]["image_action_transfer"]; + }; + }; + responses: { + 201: external["resources/images/responses/post_image_action_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/images_create_custom.yml": { + /** + * Create a Custom Image + * @description To create a new custom image, send a POST request to /v2/images. + * The body must contain a url attribute pointing to a Linux virtual machine + * image to be imported into DigitalOcean. + * The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. + * It may be compressed using gzip or bzip2 and must be smaller than 100 GB after + * being decompressed. + */ + requestBody: { + content: { + "application/json": external["resources/images/models/image_new_custom.yml"]; + }; + }; + responses: { + 202: external["resources/images/responses/new_custom_image.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/images_delete.yml": { + /** + * Delete an Image + * @description To delete a snapshot or custom image, send a `DELETE` request to `/v2/images/$IMAGE_ID`. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/images_get.yml": { + /** + * Retrieve an Existing Image + * @description To retrieve information about an image, send a `GET` request to + * `/v2/images/$IDENTIFIER`. + */ + parameters: { + /** + * @description A unique number (id) or string (slug) used to identify and reference a + * specific image. + * + * **Public** images can be identified by image `id` or `slug`. + * + * **Private** images *must* be identified by image `id`. + */ + path: { + image_id: number | string; + }; + }; + responses: { + 200: external["resources/images/responses/existing_image.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/images_list.yml": { + /** + * List All Images + * @description To list all of the images available on your account, send a GET request to /v2/images. + * + * ## Filtering Results + * ----- + * + * It's possible to request filtered results by including certain query parameters. + * + * **Image Type** + * + * Either 1-Click Application or OS Distribution images can be filtered by using the `type` query parameter. + * + * > Important: The `type` query parameter does not directly relate to the `type` attribute. + * + * To retrieve only ***distribution*** images, include the `type` query parameter set to distribution, `/v2/images?type=distribution`. + * + * To retrieve only ***application*** images, include the `type` query parameter set to application, `/v2/images?type=application`. + * + * **User Images** + * + * To retrieve only the private images of a user, include the `private` query parameter set to true, `/v2/images?private=true`. + * + * **Tags** + * + * To list all images assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your GET request. For example, `/v2/images?tag_name=$TAG_NAME`. + */ + responses: { + 200: external["resources/images/responses/all_images.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/images_update.yml": { + /** + * Update an Image + * @description To update an image, send a `PUT` request to `/v2/images/$IMAGE_ID`. + * Set the `name` attribute to the new value you would like to use. + * For custom images, the `description` and `distribution` attributes may also be updated. + */ + requestBody: { + content: { + "application/json": external["resources/images/models/image_update.yml"]; + }; + }; + responses: { + 200: external["resources/images/responses/updated_image.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/images/models/image_action.yml": Record + "resources/images/models/image_new_custom.yml": external["resources/images/models/image_update.yml"] & { + /** + * @description A URL from which the custom Linux virtual machine image may be retrieved. The image it points to must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed. + * @example http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img + */ + url?: string; + region?: external["shared/attributes/region_slug.yml"]; + tags?: external["shared/attributes/tags_array.yml"]; + } + "resources/images/models/image_update.yml": { + name?: external["resources/images/attributes.yml"]["image_name"]; + distribution?: external["shared/attributes/distribution.yml"]; + description?: external["resources/images/attributes.yml"]["image_description"]; + } + "resources/images/models/image.yml": { + /** + * @description A unique number that can be used to identify and reference a specific image. + * @example 7555620 + */ + id?: number; + name?: external["resources/images/attributes.yml"]["image_name"]; + /** + * @description Describes the kind of image. It may be one of `base`, `snapshot`, `backup`, `custom`, or `admin`. Respectively, this specifies whether an image is a DigitalOcean base OS image, user-generated Droplet snapshot, automatically created Droplet backup, user-provided virtual machine image, or an image used for DigitalOcean managed resources (e.g. DOKS worker nodes). + * @example snapshot + * @enum {string} + */ + type?: "base" | "snapshot" | "backup" | "custom" | "admin"; + distribution?: external["shared/attributes/distribution.yml"]; + /** + * @description A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id. + * @example nifty1 + */ + slug?: string; + /** + * @description This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account. + * @example true + */ + public?: boolean; + regions?: external["shared/attributes/regions_array.yml"]; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the image was created. + * @example "2020-05-04T22:23:02.000Z" + */ + created_at?: string; + /** + * @description The minimum disk size in GB required for a Droplet to use this image. + * @example 20 + */ + min_disk_size?: number; + /** + * Format: float + * @description The size of the image in gigabytes. + * @example 2.34 + */ + size_gigabytes?: number; + description?: external["resources/images/attributes.yml"]["image_description"]; + tags?: external["shared/attributes/tags_array.yml"]; + /** + * @description A status string indicating the state of a custom image. This may be `NEW`, + * `available`, `pending`, `deleted`, or `retired`. + * @example NEW + * @enum {string} + */ + status?: "NEW" | "available" | "pending" | "deleted" | "retired"; + /** + * @description A string containing information about errors that may occur when importing + * a custom image. + * @example + */ + error_message?: string; + } + "resources/images/parameters.yml": string + "resources/images/responses/all_images.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + images: (external["resources/images/models/image.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/images/responses/examples.yml": unknown + "resources/images/responses/existing_image.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + image: external["resources/images/models/image.yml"]; + }; + }; + } + "resources/images/responses/get_image_action_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/actions/models/action.yml"]; + }; + } + "resources/images/responses/get_image_actions_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/images/responses/new_custom_image.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + image?: external["resources/images/models/image.yml"]; + }; + }; + } + "resources/images/responses/post_image_action_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/actions/models/action.yml"]; + }; + } + "resources/images/responses/updated_image.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + image: external["resources/images/models/image.yml"]; + }; + }; + } + "resources/kubernetes/examples.yml": unknown + "resources/kubernetes/kubernetes_add_nodePool.yml": { + /** + * Add a Node Pool to a Kubernetes Cluster + * @description To add an additional node pool to a Kubernetes clusters, send a POST request + * to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools` with the following + * attributes. + */ + requestBody: { + content: { + /** + * @example { + * "size": "s-1vcpu-2gb", + * "count": 3, + * "name": "new-pool", + * "tags": [ + * "frontend" + * ], + * "auto_scale": true, + * "min_nodes": 3, + * "max_nodes": 6 + * } + */ + "application/json": external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"]; + }; + }; + responses: { + 201: external["resources/kubernetes/responses/node_pool_create.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_add_registry.yml": { + /** + * Add Container Registry to Kubernetes Clusters + * @description To integrate the container registry with Kubernetes clusters, send a POST request to `/v2/kubernetes/registry`. + */ + requestBody?: { + content: { + "application/json": external["resources/kubernetes/models/cluster_registries.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_create_cluster.yml": { + /** + * Create a New Kubernetes Cluster + * @description To create a new Kubernetes cluster, send a POST request to + * `/v2/kubernetes/clusters`. The request must contain at least one node pool + * with at least one worker. + * + * The request may contain a maintenance window policy describing a time period + * when disruptive maintenance tasks may be carried out. Omitting the policy + * implies that a window will be chosen automatically. See + * [here](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/) + * for details. + */ + requestBody: { + content: { + "application/json": external["resources/kubernetes/models/cluster.yml"]; + }; + }; + responses: { + 201: external["resources/kubernetes/responses/cluster_create.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_delete_cluster.yml": { + /** + * Delete a Kubernetes Cluster + * @description To delete a Kubernetes cluster and all services deployed to it, send a DELETE + * request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID`. + * + * A 204 status code with no body will be returned in response to a successful + * request. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_delete_node.yml": { + /** + * Delete a Node in a Kubernetes Cluster + * @description To delete a single node in a pool, send a DELETE request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID`. + * + * Appending the `skip_drain=1` query parameter to the request causes node + * draining to be skipped. Omitting the query parameter or setting its value to + * `0` carries out draining prior to deletion. + * + * Appending the `replace=1` query parameter to the request causes the node to + * be replaced by a new one after deletion. Omitting the query parameter or + * setting its value to `0` deletes without replacement. + */ + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_delete_nodePool.yml": { + /** + * Delete a Node Pool in a Kubernetes Cluster + * @description To delete a node pool, send a DELETE request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`. + * + * A 204 status code with no body will be returned in response to a successful + * request. Nodes in the pool will subsequently be drained and deleted. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_destroy_associatedResourcesDangerous.yml": { + /** + * Delete a Cluster and All of its Associated Resources (Dangerous) + * @description To delete a Kubernetes cluster with all of its associated resources, send a + * DELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/dangerous`. + * A 204 status code with no body will be returned in response to a successful request. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_destroy_associatedResourcesSelective.yml": { + /** + * Selectively Delete a Cluster and its Associated Resources + * @description To delete a Kubernetes cluster along with a subset of its associated resources, + * send a DELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/selective`. + * + * The JSON body of the request should include `load_balancers`, `volumes`, or + * `volume_snapshots` keys each set to an array of IDs for the associated + * resources to be destroyed. + * + * The IDs can be found by querying the cluster's associated resources endpoint. + * Any associated resource not included in the request will remain and continue + * to accrue changes on your account. + */ + requestBody: { + content: { + "application/json": external["resources/kubernetes/models/associated_kubernetes_resources.yml"]["destroy_associated_kubernetes_resources"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_availableUpgrades.yml": { + /** + * Retrieve Available Upgrades for an Existing Kubernetes Cluster + * @description To determine whether a cluster can be upgraded, and the versions to which it + * can be upgraded, send a GET request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades`. + */ + responses: { + 200: external["resources/kubernetes/responses/available_upgrades.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_cluster.yml": { + /** + * Retrieve an Existing Kubernetes Cluster + * @description To show information about an existing Kubernetes cluster, send a GET request + * to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID`. + */ + responses: { + 200: external["resources/kubernetes/responses/existing_cluster.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_clusterLintResults.yml": { + /** + * Fetch Clusterlint Diagnostics for a Kubernetes Cluster + * @description To request clusterlint diagnostics for your cluster, send a GET request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. If the `run_id` query + * parameter is provided, then the diagnostics for the specific run is fetched. + * By default, the latest results are shown. + * + * To find out how to address clusterlint feedback, please refer to + * [the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md). + */ + responses: { + 200: external["resources/kubernetes/responses/clusterlint_results.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_clusterUser.yml": { + /** + * Retrieve User Information for a Kubernetes Cluster + * @description To show information the user associated with a Kubernetes cluster, send a GET + * request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/user`. + */ + responses: { + 200: external["resources/kubernetes/responses/cluster_user.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_credentials.yml": { + /** + * Retrieve Credentials for a Kubernetes Cluster + * @description This endpoint returns a JSON object . It can be used to programmatically + * construct Kubernetes clients which cannot parse kubeconfig files. + * + * The resulting JSON object contains token-based authentication for clusters + * supporting it, and certificate-based authentication otherwise. For a list of + * supported versions and more information, see "[How to Connect to a DigitalOcean + * Kubernetes Cluster with kubectl](https://www.digitalocean.com/docs/kubernetes/how-to/connect-with-kubectl/)". + * + * To retrieve credentials for accessing a Kubernetes cluster, send a GET + * request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/credentials`. + * + * Clusters supporting token-based authentication may define an expiration by + * passing a duration in seconds as a query parameter to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS`. + * If not set or 0, then the token will have a 7 day expiry. The query parameter + * has no impact in certificate-based authentication. + */ + responses: { + 200: external["resources/kubernetes/responses/credentials.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_kubeconfig.yml": { + /** + * Retrieve the kubeconfig for a Kubernetes Cluster + * @description This endpoint returns a kubeconfig file in YAML format. It can be used to + * connect to and administer the cluster using the Kubernetes command line tool, + * `kubectl`, or other programs supporting kubeconfig files (e.g., client libraries). + * + * The resulting kubeconfig file uses token-based authentication for clusters + * supporting it, and certificate-based authentication otherwise. For a list of + * supported versions and more information, see "[How to Connect to a DigitalOcean + * Kubernetes Cluster with kubectl](https://www.digitalocean.com/docs/kubernetes/how-to/connect-with-kubectl/)". + * + * To retrieve a kubeconfig file for use with a Kubernetes cluster, send a GET + * request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig`. + * + * Clusters supporting token-based authentication may define an expiration by + * passing a duration in seconds as a query parameter to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS`. + * If not set or 0, then the token will have a 7 day expiry. The query parameter + * has no impact in certificate-based authentication. + */ + responses: { + 200: external["resources/kubernetes/responses/kubeconfig.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_get_nodePool.yml": { + /** + * Retrieve a Node Pool for a Kubernetes Cluster + * @description To show information about a specific node pool in a Kubernetes cluster, send + * a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`. + */ + responses: { + 200: external["resources/kubernetes/responses/existing_node_pool.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_list_associatedResources.yml": { + /** + * List Associated Resources for Cluster Deletion + * @description To list the associated billable resources that can be destroyed along with a cluster, send a GET request to the `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources` endpoint. + */ + responses: { + 200: external["resources/kubernetes/responses/associated_kubernetes_resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_list_clusters.yml": { + /** + * List All Kubernetes Clusters + * @description To list all of the Kubernetes clusters on your account, send a GET request + * to `/v2/kubernetes/clusters`. + */ + responses: { + 200: external["resources/kubernetes/responses/all_clusters.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_list_nodePools.yml": { + /** + * List All Node Pools in a Kubernetes Clusters + * @description To list all of the node pools in a Kubernetes clusters, send a GET request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools`. + */ + responses: { + 200: external["resources/kubernetes/responses/all_node_pools.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_list_options.yml": { + /** + * List Available Regions, Node Sizes, and Versions of Kubernetes + * @description To list the versions of Kubernetes available for use, the regions that support Kubernetes, and the available node sizes, send a GET request to `/v2/kubernetes/options`. + */ + responses: { + 200: external["resources/kubernetes/responses/all_options.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_recycle_nodePool.yml": { + /** + * Recycle a Kubernetes Node Pool + * @deprecated + * @description The endpoint has been deprecated. Please use the DELETE + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID` + * method instead. + */ + requestBody: { + content: { + "application/json": { + /** + * @example [ + * "d8db5e1a-6103-43b5-a7b3-8a948210a9fc" + * ] + */ + nodes?: (string)[]; + }; + }; + }; + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_remove_registry.yml": { + /** + * Remove Container Registry from Kubernetes Clusters + * @description To remove the container registry from Kubernetes clusters, send a DELETE request to `/v2/kubernetes/registry`. + */ + requestBody?: { + content: { + "application/json": external["resources/kubernetes/models/cluster_registries.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_run_clusterLint.yml": { + /** + * Run Clusterlint Checks on a Kubernetes Cluster + * @description Clusterlint helps operators conform to Kubernetes best practices around + * resources, security and reliability to avoid common problems while operating + * or upgrading the clusters. + * + * To request a clusterlint run on your cluster, send a POST request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. This will run all + * checks present in the `doks` group by default, if a request body is not + * specified. Optionally specify the below attributes. + * + * For information about the available checks, please refer to + * [the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md). + */ + requestBody?: { + content: { + "application/json": external["resources/kubernetes/models/clusterlint_request.yml"]; + }; + }; + responses: { + 202: external["resources/kubernetes/responses/clusterlint_run.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_update_cluster.yml": { + /** + * Update a Kubernetes Cluster + * @description To update a Kubernetes cluster, send a PUT request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID` and specify one or more of the + * attributes below. + */ + requestBody: { + content: { + "application/json": external["resources/kubernetes/models/cluster_update.yml"]; + }; + }; + responses: { + 202: external["resources/kubernetes/responses/updated_cluster.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_update_nodePool.yml": { + /** + * Update a Node Pool in a Kubernetes Cluster + * @description To update the name of a node pool, edit the tags applied to it, or adjust its + * number of nodes, send a PUT request to + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID` with the + * following attributes. + */ + requestBody: { + content: { + "application/json": external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool_update"]; + }; + }; + responses: { + 202: external["resources/kubernetes/responses/node_pool_update.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/kubernetes_upgrade_cluster.yml": { + /** + * Upgrade a Kubernetes Cluster + * @description To immediately upgrade a Kubernetes cluster to a newer patch release of + * Kubernetes, send a POST request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrade`. + * The body of the request must specify a version attribute. + * + * Available upgrade versions for a cluster can be fetched from + * `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades`. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The slug identifier for the version of Kubernetes that the cluster will be upgraded to. + * @example 1.16.13-do.0 + */ + version?: string; + }; + }; + }; + responses: { + 202: external["shared/responses/accepted.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/kubernetes/models/associated_kubernetes_resources.yml": Record + "resources/kubernetes/models/cluster_registries.yml": { + /** + * @description An array containing the UUIDs of Kubernetes clusters. + * @example [ + * "bd5f5959-5e1e-4205-a714-a914373942af", + * "50c2f44c-011d-493e-aee5-361a4a0d1844" + * ] + */ + cluster_uuids?: (string)[]; + } + "resources/kubernetes/models/cluster_update.yml": { + /** + * @description A human-readable name for a Kubernetes cluster. + * @example prod-cluster-01 + */ + name: string; + /** + * @description An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. + * @example [ + * "k8s", + * "k8s:bd5f5959-5e1e-4205-a714-a914373942af", + * "production", + * "web-team" + * ] + */ + tags?: (string)[]; + maintenance_policy?: external["resources/kubernetes/models/maintenance_policy.yml"]; + /** + * @description A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + * @default false + * @example true + */ + auto_upgrade?: boolean; + /** + * @description A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes. + * @default false + * @example true + */ + surge_upgrade?: boolean; + } + "resources/kubernetes/models/cluster.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a Kubernetes cluster. + * @example bd5f5959-5e1e-4205-a714-a914373942af + */ + id?: string; + /** + * @description A human-readable name for a Kubernetes cluster. + * @example prod-cluster-01 + */ + name: string; + /** + * @description The slug identifier for the region where the Kubernetes cluster is located. + * @example nyc1 + */ + region: string; + /** + * @description The slug identifier for the version of Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the latest version within it will be used (e.g. "1.14.6-do.1"); if set to "latest", the latest published version will be used. See the `/v2/kubernetes/options` endpoint to find all currently available versions. + * @example 1.18.6-do.0 + */ + version: string; + /** + * Format: cidr + * @description The range of IP addresses in the overlay network of the Kubernetes cluster in CIDR notation. + * @example 10.244.0.0/16 + */ + cluster_subnet?: string; + /** + * @description The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation. + * @example 10.245.0.0/16 + */ + service_subnet?: string; + /** + * Format: uuid + * @description A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned. + * @example c33931f2-a26a-4e61-b85c-4e95a2ec431b + */ + vpc_uuid?: string; + /** + * @description The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+) + * @example 68.183.121.157 + */ + ipv4?: string; + /** + * @description The base URL of the API server on the Kubernetes master node. + * @example https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com + */ + endpoint?: string; + /** + * @description An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. + * @example [ + * "k8s", + * "k8s:bd5f5959-5e1e-4205-a714-a914373942af", + * "production", + * "web-team" + * ] + */ + tags?: (string)[]; + /** @description An object specifying the details of the worker nodes available to the Kubernetes cluster. */ + node_pools: (external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"])[]; + maintenance_policy?: external["resources/kubernetes/models/maintenance_policy.yml"]; + /** + * @description A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + * @default false + * @example true + */ + auto_upgrade?: boolean; + /** @description An object containing a `state` attribute whose value is set to a string indicating the current status of the cluster. */ + status?: { + /** + * @description A string indicating the current status of the cluster. + * @example provisioning + * @enum {string} + */ + readonly state?: "running" | "provisioning" | "degraded" | "error" | "deleted" | "upgrading" | "deleting"; + /** + * @description An optional message providing additional information about the current cluster state. + * @example provisioning + */ + readonly message?: string; + }; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. + * @example 2018-11-15T16:00:11Z + */ + created_at?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. + * @example 2018-11-15T16:00:11Z + */ + updated_at?: string; + /** + * @description A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes. + * @default false + * @example true + */ + surge_upgrade?: boolean; + /** + * @description A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. + * @default false + * @example true + */ + ha?: boolean; + /** + * @description A read-only boolean value indicating if a container registry is integrated with the cluster. + * @example true + */ + registry_enabled?: boolean; + } + "resources/kubernetes/models/clusterlint_request.yml": { + /** + * @description An array of check groups that will be run when clusterlint executes checks. + * @example [ + * "basic", + * "doks", + * "security" + * ] + */ + include_groups?: (string)[]; + /** + * @description An array of checks that will be run when clusterlint executes checks. + * @example [ + * "bare-pods", + * "resource-requirements" + * ] + */ + include_checks?: (string)[]; + /** + * @description An array of check groups that will be omitted when clusterlint executes checks. + * @example [ + * "workload-health" + * ] + */ + exclude_groups?: (string)[]; + /** + * @description An array of checks that will be run when clusterlint executes checks. + * @example [ + * "default-namespace" + * ] + */ + exclude_checks?: (string)[]; + } + "resources/kubernetes/models/clusterlint_results.yml": { + /** + * @description Id of the clusterlint run that can be used later to fetch the diagnostics. + * @example 50c2f44c-011d-493e-aee5-361a4a0d1844 + */ + run_id?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was made. + * @example 2019-10-30T05:34:07Z + */ + requested_at?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was completed. + * @example 2019-10-30T05:34:11Z + */ + completed_at?: string; + /** @description An array of diagnostics reporting potential problems for the given cluster. */ + diagnostics?: ({ + /** + * @description The clusterlint check that resulted in the diagnostic. + * @example unused-config-map + */ + check_name?: string; + /** + * @description Can be one of error, warning or suggestion. + * @example warning + */ + severity?: string; + /** + * @description Feedback about the object for users to fix. + * @example Unused config map + */ + message?: string; + /** @description Metadata about the Kubernetes API object the diagnostic is reported on. */ + object?: { + /** + * @description Name of the object + * @example foo + */ + name?: string; + /** + * @description The kind of Kubernetes API object + * @example config map + */ + kind?: string; + /** + * @description The namespace the object resides in the cluster. + * @example kube-system + */ + namespace?: string; + }; + })[]; + } + "resources/kubernetes/models/credentials.yml": { + /** + * Format: uri + * @description The URL used to access the cluster API server. + * @example https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com + */ + server?: string; + /** + * Format: byte + * @description A base64 encoding of bytes representing the certificate authority data for accessing the cluster. + * @example LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURKekNDQWcrZ0F3SUJBZ0lDQm5Vd0RRWUpLb1pJaHZjTkFRRUxCUUF3TXpFVk1CTUdBMVVFQ2hNTVJHbG4KYVhSaGJFOWpaV0Z1TVJvd0dBWURWUVFERXhGck9ITmhZWE1nUTJ4MWMzUmxjaUJEUVRBZUZ3MHlNREE0TURNeApOVEkxTWpoYUZ3MDBNREE0TURNeE5USTFNamhhTURNeEZUQVRCZ05WQkFvVERFUnBaMmwwWVd4UFkyVmhiakVhCk1CZ0dBMVVFQXhNUmF6aHpZV0Z6SUVOc2RYTjBaWElnUTBFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDc21oa2JrSEpUcGhZQlN0R05VVE1ORVZTd2N3bmRtajArelQvcUZaNGsrOVNxUnYrSgpBd0lCaGpBU0JnTlZIUk1CQWY4RUNEQUdBUUgvQWdFQU1CMEdBMVVkRGdRV0JCUlRzazhhZ1hCUnFyZXdlTXJxClhwa3E1NXg5dVRBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQXB6V2F6bXNqYWxXTEx3ZjVpbWdDblNINDlKcGkKYWkvbzFMdEJvVEpleGdqZzE1ZVppaG5BMUJMc0lWNE9BZGM3UEFsL040L0hlbENrTDVxandjamRnNVdaYnMzYwozcFVUQ0g5bVVwMFg1SVdhT1VKV292Q1hGUlM1R2VKYXlkSDVPUXhqTURzR2N2UlNvZGQrVnQ2MXE3aWdFZ2I1CjBOZ1l5RnRnc2p0MHpJN3hURzZFNnlsOVYvUmFoS3lIQks2eExlM1RnUGU4SXhWa2RwT3QzR0FhSDRaK0pLR3gKYisyMVZia1NnRE1QQTlyR0VKNVZwVXlBV0FEVXZDRVFHV0hmNGpQN2ZGZlc3T050S0JWY3h3YWFjcVBVdUhzWApwRG5DZVR3V1NuUVp6L05xNmQxWUtsMFdtbkwzTEowemJzRVFGbEQ4MkkwL09MY2dZSDVxMklOZHhBPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + */ + certificate_authority_data?: string; + /** + * Format: byte + * @deprecated + * @description A base64 encoding of bytes representing the x509 client + * certificate data for access the cluster. This is only returned for clusters + * without support for token-based authentication. + * + * Newly created Kubernetes clusters do not return credentials using + * certificate-based authentication. For additional information, + * [see here](https://www.digitalocean.com/docs/kubernetes/how-to/connect-to-cluster/#authenticate). + * + * @example null + */ + client_certificate_data?: string; + /** + * Format: byte + * @deprecated + * @description A base64 encoding of bytes representing the x509 client key + * data for access the cluster. This is only returned for clusters without + * support for token-based authentication. + * + * Newly created Kubernetes clusters do not return credentials using + * certificate-based authentication. For additional information, + * [see here](https://www.digitalocean.com/docs/kubernetes/how-to/connect-to-cluster/#authenticate). + * + * @example null + */ + client_key_data?: string; + /** + * @description An access token used to authenticate with the cluster. This is only returned for clusters with support for token-based authentication. + * @example $DIGITALOCEAN_TOKEN + */ + token?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the access token expires. + * @example "2019-11-09T11:50:28.889Z" + */ + expires_at?: string; + } + "resources/kubernetes/models/maintenance_policy.yml": ({ + /** + * @description The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., `15:00`). + * @example 12:00 + */ + start_time?: string; + /** + * @description The duration of the maintenance window policy in human-readable format. + * @example 4h0m0s + */ + duration?: string; + /** + * @description The day of the maintenance window policy. May be one of `monday` through `sunday`, or `any` to indicate an arbitrary week day. + * @example any + * @enum {string} + */ + day?: "any" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; + }) | null + "resources/kubernetes/models/node_pool.yml": Record + "resources/kubernetes/models/node.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference the node. + * @example e78247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f + */ + id?: string; + /** + * @description An automatically generated, human-readable name for the node. + * @example adoring-newton-3niq + */ + name?: string; + /** @description An object containing a `state` attribute whose value is set to a string indicating the current status of the node. */ + status?: { + /** + * @description A string indicating the current status of the node. + * @example provisioning + * @enum {string} + */ + state?: "provisioning" | "running" | "draining" | "deleting"; + }; + /** + * @description The ID of the Droplet used for the worker node. + * @example 205545370 + */ + droplet_id?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the node was created. + * @example 2018-11-15T16:00:11Z + */ + created_at?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the node was last updated. + * @example 2018-11-15T16:00:11Z + */ + updated_at?: string; + } + "resources/kubernetes/models/options.yml": Record + "resources/kubernetes/models/user.yml": { + kubernetes_cluster_user?: { + /** + * Format: email + * @description The username for the cluster admin user. + * @example sammy@digitalocean.com + */ + username?: string; + /** + * @description A list of in-cluster groups that the user belongs to. + * @example [ + * "k8saas:authenticated" + * ] + */ + groups?: (string)[]; + }; + } + "resources/kubernetes/parameters.yml": string + "resources/kubernetes/responses/all_clusters.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + kubernetes_clusters?: (external["resources/kubernetes/models/cluster.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/kubernetes/responses/all_node_pools.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + node_pools?: (external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"])[]; + }; + }; + } + "resources/kubernetes/responses/all_options.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/kubernetes/models/options.yml"]["kubernetes_options"]; + }; + } + "resources/kubernetes/responses/associated_kubernetes_resources_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/kubernetes/models/associated_kubernetes_resources.yml"]["associated_kubernetes_resources"]; + }; + } + "resources/kubernetes/responses/available_upgrades.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + available_upgrade_versions?: (external["resources/kubernetes/models/options.yml"]["kubernetes_version"])[]; + }; + }; + } + "resources/kubernetes/responses/cluster_create.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + kubernetes_cluster?: external["resources/kubernetes/models/cluster.yml"]; + }; + }; + } + "resources/kubernetes/responses/cluster_user.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/kubernetes/models/user.yml"]; + }; + } + "resources/kubernetes/responses/clusterlint_results.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/kubernetes/models/clusterlint_results.yml"]; + }; + } + "resources/kubernetes/responses/clusterlint_run.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + /** + * @description ID of the clusterlint run that can be used later to fetch the diagnostics. + * @example 50c2f44c-011d-493e-aee5-361a4a0d1844 + */ + run_id?: string; + }; + }; + } + "resources/kubernetes/responses/credentials.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/kubernetes/models/credentials.yml"]; + }; + } + "resources/kubernetes/responses/examples.yml": unknown + "resources/kubernetes/responses/existing_cluster.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + kubernetes_cluster?: external["resources/kubernetes/models/cluster.yml"]; + }; + }; + } + "resources/kubernetes/responses/existing_node_pool.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + node_pool?: external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"]; + }; + }; + } + "resources/kubernetes/responses/kubeconfig.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/yaml": unknown; + }; + } + "resources/kubernetes/responses/node_pool_create.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + node_pool?: external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"]; + }; + }; + } + "resources/kubernetes/responses/node_pool_update.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + node_pool?: external["resources/kubernetes/models/node_pool.yml"]["kubernetes_node_pool"]; + }; + }; + } + "resources/kubernetes/responses/updated_cluster.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + kubernetes_cluster?: external["resources/kubernetes/models/cluster.yml"]; + }; + }; + } + "resources/load_balancers/examples.yml": unknown + "resources/load_balancers/loadBalancers_add_droplets.yml": { + /** + * Add Droplets to a Load Balancer + * @description To assign a Droplet to a load balancer instance, send a POST request to + * `/v2/load_balancers/$LOAD_BALANCER_ID/droplets`. In the body of the request, + * there should be a `droplet_ids` attribute containing a list of Droplet IDs. + * Individual Droplets can not be added to a load balancer configured with a + * Droplet tag. Attempting to do so will result in a "422 Unprocessable Entity" + * response from the API. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody: { + content: { + "application/json": { + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_add_forwardingRules.yml": { + /** + * Add Forwarding Rules to a Load Balancer + * @description To add an additional forwarding rule to a load balancer instance, send a POST + * request to `/v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules`. In the body + * of the request, there should be a `forwarding_rules` attribute containing an + * array of rules to be added. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody: { + content: { + "application/json": { + forwarding_rules: (external["resources/load_balancers/models/forwarding_rule.yml"])[]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_create.yml": { + /** + * Create a New Load Balancer + * @description To create a new load balancer instance, send a POST request to + * `/v2/load_balancers`. + * + * You can specify the Droplets that will sit behind the load balancer using one + * of two methods: + * + * * Set `droplet_ids` to a list of specific Droplet IDs. + * * Set `tag` to the name of a tag. All Droplets with this tag applied will be + * assigned to the load balancer. Additional Droplets will be automatically + * assigned as they are tagged. + * + * These methods are mutually exclusive. + */ + requestBody: { + content: { + "application/json": external["resources/load_balancers/models/load_balancer_create.yml"]; + }; + }; + responses: { + 202: external["resources/load_balancers/responses/load_balancer_create.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_delete.yml": { + /** + * Delete a Load Balancer + * @description To delete a load balancer instance, disassociating any Droplets assigned to it + * and removing it from your account, send a DELETE request to + * `/v2/load_balancers/$LOAD_BALANCER_ID`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_get.yml": { + /** + * Retrieve an Existing Load Balancer + * @description To show information about a load balancer instance, send a GET request to + * `/v2/load_balancers/$LOAD_BALANCER_ID`. + */ + responses: { + 200: external["resources/load_balancers/responses/existing_load_balancer.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_list.yml": { + /** + * List All Load Balancers + * @description To list all of the load balancer instances on your account, send a GET request + * to `/v2/load_balancers`. + */ + responses: { + 200: external["resources/load_balancers/responses/all_load_balancers.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_remove_droplets.yml": { + /** + * Remove Droplets from a Load Balancer + * @description To remove a Droplet from a load balancer instance, send a DELETE request to + * `/v2/load_balancers/$LOAD_BALANCER_ID/droplets`. In the body of the request, + * there should be a `droplet_ids` attribute containing a list of Droplet IDs. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody: { + content: { + "application/json": { + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_remove_forwardingRules.yml": { + /** + * Remove Forwarding Rules from a Load Balancer + * @description To remove forwarding rules from a load balancer instance, send a DELETE + * request to `/v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules`. In the + * body of the request, there should be a `forwarding_rules` attribute containing + * an array of rules to be removed. + * + * No response body will be sent back, but the response code will indicate + * success. Specifically, the response code will be a 204, which means that the + * action was successful with no returned body data. + */ + requestBody: { + content: { + "application/json": { + forwarding_rules: (external["resources/load_balancers/models/forwarding_rule.yml"])[]; + }; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/loadBalancers_update.yml": { + /** + * Update a Load Balancer + * @description To update a load balancer's settings, send a PUT request to + * `/v2/load_balancers/$LOAD_BALANCER_ID`. The request should contain a full + * representation of the load balancer including existing attributes. It may + * contain _one of_ the `droplets_ids` or `tag` attributes as they are mutually + * exclusive. **Note that any attribute that is not provided will be reset to its + * default value.** + */ + requestBody: { + content: { + "application/json": external["resources/load_balancers/models/load_balancer_create.yml"]; + }; + }; + responses: { + 200: external["resources/load_balancers/responses/updated_load_balancer.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/load_balancers/models/attributes.yml": Record + "resources/load_balancers/models/forwarding_rule.yml": { + /** + * @description The protocol used for traffic to the load balancer. The possible values are: `http`, `https`, `http2`, `tcp`, or `udp`. If you set the `entry_protocol` to `upd`, the `target_protocol` must be set to `udp`. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly. + * + * @example https + * @enum {string} + */ + entry_protocol: "http" | "https" | "http2" | "tcp" | "udp"; + /** + * @description An integer representing the port on which the load balancer instance will listen. + * @example 443 + */ + entry_port: number; + /** + * @description The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: `http`, `https`, `http2`, `tcp`, or `udp`. If you set the `target_protocol` to `upd`, the `entry_protocol` must be set to `udp`. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly. + * + * @example http + * @enum {string} + */ + target_protocol: "http" | "https" | "http2" | "tcp" | "udp"; + /** + * @description An integer representing the port on the backend Droplets to which the load balancer will send traffic. + * @example 80 + */ + target_port: number; + /** + * @description The ID of the TLS certificate used for SSL termination if enabled. + * @example 892071a0-bb95-49bc-8021-3afd67a210bf + */ + certificate_id?: string; + /** + * @description A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. + * @example false + */ + tls_passthrough?: boolean; + } + "resources/load_balancers/models/health_check.yml": { + /** + * @description The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https`, or `tcp`. + * @default http + * @example http + * @enum {string} + */ + protocol?: "http" | "https" | "tcp"; + /** + * @description An integer representing the port on the backend Droplets on which the health check will attempt a connection. + * @default 80 + * @example 80 + */ + port?: number; + /** + * @description The path on the backend Droplets to which the load balancer instance will send a request. + * @default / + * @example / + */ + path?: string; + /** + * @description The number of seconds between between two consecutive health checks. + * @default 10 + * @example 10 + */ + check_interval_seconds?: number; + /** + * @description The number of seconds the load balancer instance will wait for a response until marking a health check as failed. + * @default 5 + * @example 5 + */ + response_timeout_seconds?: number; + /** + * @description The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. + * @default 5 + * @example 5 + */ + unhealthy_threshold?: number; + /** + * @description The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. + * @default 3 + * @example 3 + */ + healthy_threshold?: number; + } + "resources/load_balancers/models/load_balancer_base.yml": { + /** + * Format: uuid + * @description A unique ID that can be used to identify and reference a load balancer. + * @example 4de7ac8b-495b-4884-9a69-1050c6793cd6 + */ + id?: string; + /** + * @description A human-readable name for a load balancer instance. + * @example example-lb-01 + */ + name?: string; + /** + * @description The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project. If an invalid project ID is provided, the load balancer will not be created. + * @example 4de7ac8b-495b-4884-9a69-1050c6793cd6 + */ + project_id?: string; + /** + * @description An attribute containing the public-facing IP address of the load balancer. + * @example 104.131.186.241 + */ + ip?: string; + /** + * @description How many nodes the load balancer contains. Each additional node increases the load balancer's ability to manage more connections. Load balancers can be scaled up or down, and you can change the number of nodes after creation up to once per hour. This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use the `size` field to scale load balancers that reside in these regions. + * @default 1 + * @example 3 + */ + size_unit?: number; + /** + * @deprecated + * @description This field has been replaced by the `size_unit` field for all regions except in AMS2, NYC2, and SFO1. Each available load balancer size now equates to the load balancer having a set number of nodes. + * * `lb-small` = 1 node + * * `lb-medium` = 3 nodes + * * `lb-large` = 6 nodes + * + * You can resize load balancers after creation up to once per hour. You cannot resize a load balancer within the first hour of its creation. + * @default lb-small + * @example lb-small + * @enum {string} + */ + size?: "lb-small" | "lb-medium" | "lb-large"; + /** + * @deprecated + * @description This field has been deprecated. You can no longer specify an algorithm for load balancers. + * @default round_robin + * @example round_robin + * @enum {string} + */ + algorithm?: "round_robin" | "least_connections"; + /** + * @description A status string indicating the current state of the load balancer. This can be `new`, `active`, or `errored`. + * @example new + * @enum {string} + */ + status?: "new" | "active" | "errored"; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the load balancer was created. + * @example 2017-02-01T22:22:58Z + */ + created_at?: string; + /** @description An array of objects specifying the forwarding rules for a load balancer. */ + forwarding_rules: (external["resources/load_balancers/models/forwarding_rule.yml"])[]; + health_check?: external["resources/load_balancers/models/health_check.yml"]; + sticky_sessions?: external["resources/load_balancers/models/sticky_sessions.yml"]; + /** + * @description A boolean value indicating whether HTTP requests to the load balancer on port 80 will be redirected to HTTPS on port 443. + * @default false + * @example true + */ + redirect_http_to_https?: boolean; + /** + * @description A boolean value indicating whether PROXY Protocol is in use. + * @default false + * @example true + */ + enable_proxy_protocol?: boolean; + /** + * @description A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. + * @default false + * @example true + */ + enable_backend_keepalive?: boolean; + /** + * Format: uuid + * @description A string specifying the UUID of the VPC to which the load balancer is assigned. + * @example c33931f2-a26a-4e61-b85c-4e95a2ec431b + */ + vpc_uuid?: string; + /** + * @description A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. + * @default false + * @example true + */ + disable_lets_encrypt_dns_records?: boolean; + } + "resources/load_balancers/models/load_balancer_create.yml": OneOf<[{ + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"]; + } & { + region?: external["shared/attributes/region_slug.yml"]; + } & external["resources/load_balancers/models/load_balancer_base.yml"], { + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_tag"]; + } & { + region?: external["shared/attributes/region_slug.yml"]; + } & external["resources/load_balancers/models/load_balancer_base.yml"]]> + "resources/load_balancers/models/load_balancer.yml": external["resources/load_balancers/models/load_balancer_base.yml"] & ({ + region?: Record & external["resources/regions/models/region.yml"]; + }) & { + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"]; + } & { + $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_tag"]; + } + "resources/load_balancers/models/sticky_sessions.yml": { + /** + * @description An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are `cookies` or `none`. + * @default none + * @example cookies + * @enum {string} + */ + type?: "cookies" | "none"; + /** + * @description The name of the cookie sent to the client. This attribute is only returned when using `cookies` for the sticky sessions type. + * @example DO-LB + */ + cookie_name?: string; + /** + * @description The number of seconds until the cookie set by the load balancer expires. This attribute is only returned when using `cookies` for the sticky sessions type. + * @example 300 + */ + cookie_ttl_seconds?: number; + } + "resources/load_balancers/parameters.yml": string + "resources/load_balancers/responses/all_load_balancers.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + load_balancers?: (external["resources/load_balancers/models/load_balancer.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/load_balancers/responses/examples.yml": unknown + "resources/load_balancers/responses/existing_load_balancer.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + load_balancer?: external["resources/load_balancers/models/load_balancer.yml"]; + }; + }; + } + "resources/load_balancers/responses/load_balancer_create.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + load_balancer?: external["resources/load_balancers/models/load_balancer.yml"]; + }; + }; + } + "resources/load_balancers/responses/updated_load_balancer.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + load_balancer?: external["resources/load_balancers/models/load_balancer.yml"]; + }; + }; + } + "resources/monitoring/models/alert_policy_request.yml": { + alerts: external["resources/monitoring/models/alerts.yml"]; + /** + * @example GreaterThan + * @enum {string} + */ + compare: "GreaterThan" | "LessThan"; + /** @example CPU Alert */ + description: string; + /** @example true */ + enabled: boolean; + /** + * @example [ + * "192018292" + * ] + */ + entities: (string)[]; + /** + * @example [ + * "droplet_tag" + * ] + */ + tags: (string)[]; + /** + * @example v1/insights/droplet/cpu + * @enum {string} + */ + type: "v1/insights/droplet/load_1" | "v1/insights/droplet/load_5" | "v1/insights/droplet/load_15" | "v1/insights/droplet/memory_utilization_percent" | "v1/insights/droplet/disk_utilization_percent" | "v1/insights/droplet/cpu" | "v1/insights/droplet/disk_read" | "v1/insights/droplet/disk_write" | "v1/insights/droplet/public_outbound_bandwidth" | "v1/insights/droplet/public_inbound_bandwidth" | "v1/insights/droplet/private_outbound_bandwidth" | "v1/insights/droplet/private_inbound_bandwidth" | "v1/insights/lbaas/avg_cpu_utilization_percent" | "v1/insights/lbaas/connection_utilization_percent" | "v1/insights/lbaas/droplet_health" | "v1/insights/lbaas/tls_connections_per_second_utilization_percent" | "v1/dbaas/alerts/load_15_alerts" | "v1/dbaas/alerts/memory_utilization_alerts" | "v1/dbaas/alerts/disk_utilization_alerts" | "v1/dbaas/alerts/cpu_alerts"; + /** + * Format: float + * @example 80 + */ + value: number; + /** + * @example 5m + * @enum {string} + */ + window: "5m" | "10m" | "30m" | "1h"; + } + "resources/monitoring/models/alert_policy.yml": { + alerts: external["resources/monitoring/models/alerts.yml"]; + /** + * @example GreaterThan + * @enum {string} + */ + compare: "GreaterThan" | "LessThan"; + /** @example CPU Alert */ + description: string; + /** @example true */ + enabled: boolean; + /** + * @example [ + * "192018292" + * ] + */ + entities: (string)[]; + /** + * @example [ + * "droplet_tag" + * ] + */ + tags: (string)[]; + /** + * @example v1/insights/droplet/cpu + * @enum {string} + */ + type: "v1/insights/droplet/load_1" | "v1/insights/droplet/load_5" | "v1/insights/droplet/load_15" | "v1/insights/droplet/memory_utilization_percent" | "v1/insights/droplet/disk_utilization_percent" | "v1/insights/droplet/cpu" | "v1/insights/droplet/disk_read" | "v1/insights/droplet/disk_write" | "v1/insights/droplet/public_outbound_bandwidth" | "v1/insights/droplet/public_inbound_bandwidth" | "v1/insights/droplet/private_outbound_bandwidth" | "v1/insights/droplet/private_inbound_bandwidth" | "v1/insights/lbaas/avg_cpu_utilization_percent" | "v1/insights/lbaas/connection_utilization_percent" | "v1/insights/lbaas/droplet_health" | "v1/insights/lbaas/tls_connections_per_second_utilization_percent" | "v1/dbaas/alerts/load_15_alerts" | "v1/dbaas/alerts/memory_utilization_alerts" | "v1/dbaas/alerts/disk_utilization_alerts" | "v1/dbaas/alerts/cpu_alerts"; + /** @example 78b3da62-27e5-49ba-ac70-5db0b5935c64 */ + uuid: string; + /** + * Format: float + * @example 80 + */ + value: number; + /** + * @example 5m + * @enum {string} + */ + window: "5m" | "10m" | "30m" | "1h"; + } + "resources/monitoring/models/alerts.yml": { + /** + * @description An email to notify on an alert trigger. + * @example [ + * "bob@exmaple.com" + * ] + */ + email: (string)[]; + /** @description Slack integration details. */ + slack: (external["resources/monitoring/models/slack_details.yml"])[]; + } + "resources/monitoring/models/list_alert_policy.yml": { + policies: (external["resources/monitoring/models/alert_policy.yml"])[]; + } + "resources/monitoring/models/metrics_data.yml": { + /** @description Result of query. */ + result: (external["resources/monitoring/models/metrics_result.yml"])[]; + /** + * @example matrix + * @enum {string} + */ + resultType: "matrix"; + } + "resources/monitoring/models/metrics_result.yml": { + /** + * @description An object containing the metric labels. + * @example { + * "host_id": "19201920" + * } + */ + metric: { + [key: string]: string | undefined; + }; + /** + * @example [ + * [ + * 1435781430, + * "1" + * ], + * [ + * 1435781445, + * "1" + * ] + * ] + */ + values: ((number | string)[])[]; + } + "resources/monitoring/models/metrics.yml": { + data: external["resources/monitoring/models/metrics_data.yml"]; + /** + * @example success + * @enum {string} + */ + status: "success" | "error"; + } + "resources/monitoring/models/slack_details.yml": { + /** + * @description Slack channel to notify of an alert trigger. + * @example Production Alerts + */ + channel: string; + /** + * @description Slack Webhook URL. + * @example https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ + */ + url: string; + } + "resources/monitoring/monitoring_create_alertPolicy.yml": { + /** + * Create Alert Policy + * @description To create a new alert, send a POST request to `/v2/monitoring/alerts`. + */ + /** + * @description The `type` field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the `entities` array. If both the `tags` array and `entities` array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy: + * + * Type | Description | Valid Entity Type + * -----|-------------|-------------------- + * `v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID + * `v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID + * `v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID + * `v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID + * `v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID + * `v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID + * `v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID + * `v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID + * `v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID + * `v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID + * `v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID + * `v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization|load balancer ID + * `v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID + */ + requestBody: { + content: { + "application/json": external["resources/monitoring/models/alert_policy_request.yml"]; + }; + }; + responses: { + 200: external["resources/monitoring/responses/alert_policy_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_delete_alertPolicy.yml": { + /** + * Delete an Alert Policy + * @description To delete an alert policy, send a DELETE request to `/v2/monitoring/alerts/{alert_uuid}` + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_alertPolicy.yml": { + /** + * Retrieve an Existing Alert Policy + * @description To retrieve a given alert policy, send a GET request to `/v2/monitoring/alerts/{alert_uuid}` + */ + responses: { + 200: external["resources/monitoring/responses/alert_policy_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletBandwidthMetrics.yml": { + /** + * Get Droplet Bandwidth Metrics + * @description To retrieve bandwidth metrics for a given Droplet, send a GET request to `/v2/monitoring/metrics/droplet/bandwidth`. Use the `interface` query parameter to specify if the results should be for the `private` or `public` interface. Use the `direction` query parameter to specify if the results should be for `inbound` or `outbound` traffic. + */ + responses: { + 200: external["resources/monitoring/responses/droplet_bandwidth_metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_DropletCpuMetrics.yml": { + /** + * Get Droplet CPU Metrics + * @description To retrieve CPU metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/cpu`. + */ + responses: { + 200: external["resources/monitoring/responses/droplet_cpu_metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletFilesystemFreeMetrics.yml": { + /** + * Get Droplet Filesystem Free Metrics + * @description To retrieve filesystem free metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_free`. + */ + responses: { + 200: external["resources/monitoring/responses/droplet_filesystem_metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletFilesystemSizeMetrics.yml": { + /** + * Get Droplet Filesystem Size Metrics + * @description To retrieve filesystem size metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_size`. + */ + responses: { + 200: external["resources/monitoring/responses/droplet_filesystem_metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletLoad1Metrics.yml": { + /** + * Get Droplet Load1 Metrics + * @description To retrieve 1 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_1`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletLoad5Metrics.yml": { + /** + * Get Droplet Load5 Metrics + * @description To retrieve 5 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_5`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletLoad15Metrics.yml": { + /** + * Get Droplet Load15 Metrics + * @description To retrieve 15 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_15`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletMemoryAvailableMetrics.yml": { + /** + * Get Droplet Available Memory Metrics + * @description To retrieve available memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_available`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletMemoryCachedMetrics.yml": { + /** + * Get Droplet Cached Memory Metrics + * @description To retrieve cached memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_cached`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletMemoryFreeMetrics.yml": { + /** + * Get Droplet Free Memory Metrics + * @description To retrieve free memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_free`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_get_dropletMemoryTotalMetrics.yml": { + /** + * Get Droplet Total Memory Metrics + * @description To retrieve total memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_total`. + */ + responses: { + 200: external["resources/monitoring/responses/metric_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_list_alertPolicy.yml": { + /** + * List Alert Policies + * @description Returns all alert policies that are configured for the given account. To List all alert policies, send a GET request to `/v2/monitoring/alerts`. + */ + responses: { + 200: external["resources/monitoring/responses/list_alert_policy_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/monitoring_update_alertPolicy.yml": { + /** + * Update an Alert Policy + * @description To update en existing policy, send a PUT request to `v2/monitoring/alerts/{alert_uuid}`. + */ + /** + * @description The `type` field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the `entities` array. If both the `tags` array and `entities` array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy: + * + * Type | Description | Valid Entity Type + * -----|-------------|-------------------- + * `v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID + * `v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID + * `v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID + * `v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID + * `v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID + * `v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID + * `v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID + * `v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID + * `v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID + * `v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID + * `v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID + * `v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID + * `v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization|load balancer ID + * `v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID + * `v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID + */ + requestBody: { + content: { + "application/json": external["resources/monitoring/models/alert_policy_request.yml"]; + }; + }; + responses: { + 200: external["resources/monitoring/responses/alert_policy_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/monitoring/parameters.yml": string + "resources/monitoring/responses/alert_policy_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + policy?: external["resources/monitoring/models/alert_policy.yml"]; + }; + }; + } + "resources/monitoring/responses/droplet_bandwidth_metric_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/monitoring/models/metrics.yml"]; + }; + } + "resources/monitoring/responses/droplet_cpu_metric_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/monitoring/models/metrics.yml"]; + }; + } + "resources/monitoring/responses/droplet_filesystem_metric_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/monitoring/models/metrics.yml"]; + }; + } + "resources/monitoring/responses/examples.yml": unknown + "resources/monitoring/responses/list_alert_policy_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/monitoring/models/list_alert_policy.yml"] & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/monitoring/responses/metric_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/monitoring/models/metrics.yml"]; + }; + } + "resources/projects/models/project_assignment.yml": { + /** + * @description A list of uniform resource names (URNs) to be added to a project. + * @example [ + * "do:droplet:13457723" + * ] + */ + resources?: (external["shared/attributes/urn.yml"])[]; + } + "resources/projects/models/project.yml": Record + "resources/projects/models/resource.yml": { + urn?: external["shared/attributes/urn.yml"]; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the project was created. + * @example 2018-09-28T19:26:37Z + */ + assigned_at?: string; + /** @description The links object contains the `self` object, which contains the resource relationship. */ + links?: { + /** + * Format: uri + * @description A URI that can be used to retrieve the resource. + * @example https://api.digitalocean.com/v2/droplets/13457723 + */ + self?: string; + }; + /** + * @description The status of assigning and fetching the resources. + * @example ok + * @enum {string} + */ + status?: "ok" | "not_found" | "assigned" | "already_assigned" | "service_down"; + } + "resources/projects/parameters.yml": string + "resources/projects/projects_assign_resources_default.yml": { + /** + * Assign Resources to Default Project + * @description To assign resources to your default project, send a POST request to `/v2/projects/default/resources`. + */ + requestBody: { + content: { + "application/json": external["resources/projects/models/project_assignment.yml"]; + }; + }; + responses: { + 200: external["resources/projects/responses/assigned_resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_assign_resources.yml": { + /** + * Assign Resources to a Project + * @description To assign resources to a project, send a POST request to `/v2/projects/$PROJECT_ID/resources`. + */ + requestBody: { + content: { + "application/json": external["resources/projects/models/project_assignment.yml"]; + }; + }; + responses: { + 200: external["resources/projects/responses/assigned_resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_create.yml": { + /** + * Create a Project + * @description To create a project, send a POST request to `/v2/projects`. + */ + requestBody: { + content: { + "application/json": external["resources/projects/models/project.yml"]["project_base"]; + }; + }; + responses: { + 201: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_delete.yml": { + /** + * Delete an Existing Project + * @description To delete a project, send a DELETE request to `/v2/projects/$PROJECT_ID`. To + * be deleted, a project must not have any resources assigned to it. Any existing + * resources must first be reassigned or destroyed, or you will receive a 412 error. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 412: external["resources/projects/responses/precondition_failed.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_get_default.yml": { + /** + * Retrieve the Default Project + * @description To get your default project, send a GET request to `/v2/projects/default`. + */ + responses: { + 200: external["resources/projects/responses/default_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_get.yml": { + /** + * Retrieve an Existing Project + * @description To get a project, send a GET request to `/v2/projects/$PROJECT_ID`. + */ + responses: { + 200: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_list_resources_default.yml": { + /** + * List Default Project Resources + * @description To list all your resources in your default project, send a GET request to `/v2/projects/default/resources`. + */ + responses: { + 200: external["resources/projects/responses/resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_list_resources.yml": { + /** + * List Project Resources + * @description To list all your resources in a project, send a GET request to `/v2/projects/$PROJECT_ID/resources`. + */ + responses: { + 200: external["resources/projects/responses/resources_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_list.yml": { + /** + * List All Projects + * @description To list all your projects, send a GET request to `/v2/projects`. + */ + responses: { + 200: external["resources/projects/responses/projects_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_patch_default.yml": { + /** + * Patch the Default Project + * @description To update only specific attributes of your default project, send a PATCH request to `/v2/projects/default`. At least one of the following attributes needs to be sent. + */ + requestBody: { + content: { + /** + * @example { + * "name": "my-web-api" + * } + */ + "application/json": external["resources/projects/models/project.yml"]["project"]; + }; + }; + responses: { + 200: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_patch.yml": { + /** + * Patch a Project + * @description To update only specific attributes of a project, send a PATCH request to `/v2/projects/$PROJECT_ID`. At least one of the following attributes needs to be sent. + */ + requestBody: { + content: { + /** + * @example { + * "name": "my-web-api" + * } + */ + "application/json": external["resources/projects/models/project.yml"]["project"]; + }; + }; + responses: { + 200: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_update_default.yml": { + /** + * Update the Default Project + * @description To update you default project, send a PUT request to `/v2/projects/default`. All of the following attributes must be sent. + */ + requestBody: { + content: { + "application/json": external["resources/projects/models/project.yml"]["project"]; + }; + }; + responses: { + 200: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/projects_update.yml": { + /** + * Update a Project + * @description To update a project, send a PUT request to `/v2/projects/$PROJECT_ID`. All of the following attributes must be sent. + */ + requestBody: { + content: { + "application/json": external["resources/projects/models/project.yml"]["project"]; + }; + }; + responses: { + 200: external["resources/projects/responses/existing_project.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/projects/responses/assigned_resources_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + resources?: (external["resources/projects/models/resource.yml"])[]; + }; + }; + } + "resources/projects/responses/default_project.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + project?: external["resources/projects/models/project.yml"]["project"]; + }; + }; + } + "resources/projects/responses/existing_project.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + project?: external["resources/projects/models/project.yml"]["project"]; + }; + }; + } + "resources/projects/responses/precondition_failed.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "resources/projects/responses/projects_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + projects?: (external["resources/projects/models/project.yml"]["project"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/projects/responses/resources_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + resources?: (external["resources/projects/models/resource.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/regions/models/region.yml": { + /** + * @description The display name of the region. This will be a full name that is used in the control panel and other interfaces. + * @example New York 3 + */ + name: string; + /** + * @description A human-readable string that is used as a unique identifier for each region. + * @example nyc3 + */ + slug: string; + /** + * @description This attribute is set to an array which contains features available in this region + * @example [ + * "private_networking", + * "backups", + * "ipv6", + * "metadata", + * "install_agent", + * "storage", + * "image_transfer" + * ] + */ + features: Record; + /** + * @description This is a boolean value that represents whether new Droplets can be created in this region. + * @example true + */ + available: boolean; + /** + * @description This attribute is set to an array which contains the identifying slugs for the sizes available in this region. + * @example [ + * "s-1vcpu-1gb", + * "s-1vcpu-2gb", + * "s-1vcpu-3gb", + * "s-2vcpu-2gb", + * "s-3vcpu-1gb", + * "s-2vcpu-4gb", + * "s-4vcpu-8gb", + * "s-6vcpu-16gb", + * "s-8vcpu-32gb", + * "s-12vcpu-48gb", + * "s-16vcpu-64gb", + * "s-20vcpu-96gb", + * "s-24vcpu-128gb", + * "s-32vcpu-192g" + * ] + */ + sizes: Record; + } + "resources/regions/regions_list.yml": { + /** + * List All Data Center Regions + * @description To list all of the regions that are available, send a GET request to `/v2/regions`. + * The response will be a JSON object with a key called `regions`. The value of this will be an array of `region` objects, each of which will contain the standard region attributes. + */ + responses: { + 200: external["resources/regions/responses/all_regions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/regions/responses/all_regions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + regions: (external["resources/regions/models/region.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/registry/models/docker_credentials.yml": { + auths?: { + "registry.digitalocean.com"?: { + /** + * @description A base64 encoded string containing credentials for the container registry. + * @example YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK + */ + auth?: string; + }; + }; + } + "resources/registry/models/garbage_collection.yml": { + /** + * @description A string specifying the UUID of the garbage collection. + * @example eff0feee-49c7-4e8f-ba5c-a320c109c8a8 + */ + uuid?: string; + /** + * @description The name of the container registry. + * @example example + */ + registry_name?: string; + /** + * @description The current status of this garbage collection. + * @example requested + * @enum {string} + */ + status?: "requested" | "waiting for write JWTs to expire" | "scanning manifests" | "deleting unreferenced blobs" | "cancelling" | "failed" | "succeeded" | "cancelled"; + /** + * Format: date-time + * @description The time the garbage collection was created. + * @example "2020-10-30T21:03:24.000Z" + */ + created_at?: string; + /** + * Format: date-time + * @description The time the garbage collection was last updated. + * @example "2020-10-30T21:03:44.000Z" + */ + updated_at?: string; + /** + * @description The number of blobs deleted as a result of this garbage collection. + * @example 42 + */ + blobs_deleted?: number; + /** + * @description The number of bytes freed as a result of this garbage collection. + * @example 667 + */ + freed_bytes?: number; + } + "resources/registry/models/registry_create.yml": { + /** + * @description A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. + * @example example + */ + name: string; + /** + * @description The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint. + * @example basic + * @enum {string} + */ + subscription_tier_slug: "starter" | "basic" | "professional"; + /** + * @description Slug of the region where registry data is stored. When not provided, a region will be selected. + * @example fra1 + * @enum {string} + */ + region?: "nyc3" | "sfo3" | "ams3" | "sgp1" | "fra1"; + } + "resources/registry/models/registry.yml": { + /** + * @description A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. + * @example example + */ + name?: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the registry was created. + * @example 2020-03-21T16:02:37Z + */ + created_at?: string; + /** + * @description Slug of the region where registry data is stored + * @example fra1 + */ + region?: string; + /** + * @description The amount of storage used in the registry in bytes. + * @example 29393920 + */ + storage_usage_bytes?: number; + /** + * Format: date-time + * @description The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. + * @example 2020-11-04T21:39:49.530562231Z + */ + storage_usage_bytes_updated_at?: string; + subscription?: Record & external["resources/registry/models/subscription.yml"]; + } + "resources/registry/models/repository_blob.yml": { + /** + * @description The digest of the blob + * @example sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221 + */ + digest?: string; + /** + * @description The compressed size of the blob in bytes. + * @example 2803255 + */ + compressed_size_bytes?: number; + } + "resources/registry/models/repository_manifest.yml": { + /** + * @description The name of the container registry. + * @example example + */ + registry_name?: string; + /** + * @description The name of the repository. + * @example repo-1 + */ + repository?: string; + /** + * @description The manifest digest + * @example sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221 + */ + digest?: string; + /** + * @description The compressed size of the manifest in bytes. + * @example 2803255 + */ + compressed_size_bytes?: number; + /** + * @description The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available). + * @example 5861888 + */ + size_bytes?: number; + /** + * Format: date-time + * @description The time the manifest was last updated. + * @example 2020-04-09T23:54:25Z + */ + updated_at?: string; + /** + * @description All tags associated with this manifest + * @example [ + * "latest", + * "v1", + * "v2" + * ] + */ + tags?: (string)[]; + /** @description All blobs associated with this manifest */ + blobs?: (external["resources/registry/models/repository_blob.yml"])[]; + } + "resources/registry/models/repository_tag.yml": { + /** + * @description The name of the container registry. + * @example example + */ + registry_name?: string; + /** + * @description The name of the repository. + * @example repo-1 + */ + repository?: string; + /** + * @description The name of the tag. + * @example latest + */ + tag?: string; + /** + * @description The digest of the manifest associated with the tag. + * @example sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221 + */ + manifest_digest?: string; + /** + * @description The compressed size of the tag in bytes. + * @example 2803255 + */ + compressed_size_bytes?: number; + /** + * @description The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available). + * @example 5861888 + */ + size_bytes?: number; + /** + * Format: date-time + * @description The time the tag was last updated. + * @example 2020-04-09T23:54:25Z + */ + updated_at?: string; + } + "resources/registry/models/repository_v2.yml": { + /** + * @description The name of the container registry. + * @example example + */ + registry_name?: string; + /** + * @description The name of the repository. + * @example repo-1 + */ + name?: string; + latest_manifest?: external["resources/registry/models/repository_manifest.yml"]; + /** + * @description The number of tags in the repository. + * @example 1 + */ + tag_count?: number; + /** + * @description The number of manifests in the repository. + * @example 1 + */ + manifest_count?: number; + } + "resources/registry/models/repository.yml": { + /** + * @description The name of the container registry. + * @example example + */ + registry_name?: string; + /** + * @description The name of the repository. + * @example repo-1 + */ + name?: string; + latest_tag?: external["resources/registry/models/repository_tag.yml"]; + /** + * @description The number of tags in the repository. + * @example 1 + */ + tag_count?: number; + } + "resources/registry/models/subscription_tier.yml": Record + "resources/registry/models/subscription.yml": { + tier?: external["resources/registry/models/subscription_tier.yml"]["subscription_tier_base"]; + /** + * Format: date-time + * @description The time at which the subscription was created. + * @example 2020-01-23T21:19:12Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time at which the subscription was last updated. + * @example 2020-11-05T15:53:24Z + */ + updated_at?: string; + } + "resources/registry/models/update_registry.yml": { + /** + * @description A boolean value indicating that the garbage collection should be cancelled. + * @example true + */ + cancel?: boolean; + } + "resources/registry/models/validate_registry.yml": { + /** + * @description A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. + * @example example + */ + name: string; + } + "resources/registry/parameters.yml": string + "resources/registry/registry_create.yml": { + /** + * Create Container Registry + * @description To create your container registry, send a POST request to `/v2/registry`. + * + * The `name` becomes part of the URL for images stored in the registry. For + * example, if your registry is called `example`, an image in it will have the + * URL `registry.digitalocean.com/example/image:tag`. + */ + requestBody: { + content: { + "application/json": external["resources/registry/models/registry_create.yml"]; + }; + }; + responses: { + 201: external["resources/registry/responses/registry_info.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_delete_repositoryManifest.yml": { + /** + * Delete Container Registry Repository Manifest + * @description To delete a container repository manifest by digest, send a DELETE request to + * `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST`. + * + * Note that if your repository name contains `/` characters, it must be + * URL-encoded in the request URL. For example, to delete + * `registry.digitalocean.com/example/my/repo@sha256:abcd`, the path would be + * `/v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_delete_repositoryTag.yml": { + /** + * Delete Container Registry Repository Tag + * @description To delete a container repository tag, send a DELETE request to + * `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG`. + * + * Note that if your repository name contains `/` characters, it must be + * URL-encoded in the request URL. For example, to delete + * `registry.digitalocean.com/example/my/repo:mytag`, the path would be + * `/v2/registry/example/repositories/my%2Frepo/tags/mytag`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_delete.yml": { + /** + * Delete Container Registry + * @description To delete your container registry, destroying all container image data stored in it, send a DELETE request to `/v2/registry`. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_get_dockerCredentials.yml": { + /** + * Get Docker Credentials for Container Registry + * @description In order to access your container registry with the Docker client or from a + * Kubernetes cluster, you will need to configure authentication. The necessary + * JSON configuration can be retrieved by sending a GET request to + * `/v2/registry/docker-credentials`. + * + * The response will be in the format of a Docker `config.json` file. To use the + * config in your Kubernetes cluster, create a Secret with: + * + * kubectl create secret generic docr \ + * --from-file=.dockerconfigjson=config.json \ + * --type=kubernetes.io/dockerconfigjson + * + * By default, the returned credentials have read-only access to your registry + * and cannot be used to push images. This is appropriate for most Kubernetes + * clusters. To retrieve read/write credentials, suitable for use with the Docker + * client or in a CI system, read_write may be provided as query parameter. For + * example: `/v2/registry/docker-credentials?read_write=true` + * + * By default, the returned credentials will not expire. To retrieve credentials + * with an expiry set, expiry_seconds may be provided as a query parameter. For + * example: `/v2/registry/docker-credentials?expiry_seconds=3600` will return + * credentials that expire after one hour. + */ + responses: { + 200: external["resources/registry/responses/docker_credentials.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_get_garbageCollection.yml": { + /** + * Get Active Garbage Collection + * @description To get information about the currently-active garbage collection for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collection`. + */ + responses: { + 200: external["resources/registry/responses/garbage_collection.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_get_options.yml": { + /** + * List Registry Options (Subscription Tiers and Available Regions) + * @description This endpoint serves to provide additional information as to which option values are available when creating a container registry. + * There are multiple subscription tiers available for container registry. Each tier allows a different number of image repositories to be created in your registry, and has a different amount of storage and transfer included. + * There are multiple regions available for container registry and controls where your data is stored. + * To list the available options, send a GET request to `/v2/registry/options`. + */ + responses: { + 200: external["resources/registry/responses/registry_options_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_get_subscription.yml": { + /** + * Get Subscription Information + * @description A subscription is automatically created when you configure your container registry. To get information about your subscription, send a GET request to `/v2/registry/subscription`. + */ + responses: { + 200: external["resources/registry/responses/subscription_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_get.yml": { + /** + * Get Container Registry Information + * @description To get information about your container registry, send a GET request to `/v2/registry`. + */ + responses: { + 200: external["resources/registry/responses/registry_info.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_list_garbageCollections.yml": { + /** + * List Garbage Collections + * @description To get information about past garbage collections for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collections`. + */ + responses: { + 200: external["resources/registry/responses/garbage_collections.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_list_repositories.yml": { + /** + * List All Container Registry Repositories + * @deprecated + * @description This endpoint has been deprecated in favor of the _List All Container Registry Repositories [V2]_ endpoint. + * + * To list all repositories in your container registry, send a GET + * request to `/v2/registry/$REGISTRY_NAME/repositories`. + */ + responses: { + 200: external["resources/registry/responses/all_repositories.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_list_repositoriesV2.yml": { + /** + * List All Container Registry Repositories (V2) + * @description To list all repositories in your container registry, send a GET request to `/v2/registry/$REGISTRY_NAME/repositoriesV2`. + */ + responses: { + 200: external["resources/registry/responses/all_repositories_v2.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_list_repositoryManifests.yml": { + /** + * List All Container Registry Repository Manifests + * @description To list all manifests in your container registry repository, send a GET + * request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests`. + * + * Note that if your repository name contains `/` characters, it must be + * URL-encoded in the request URL. For example, to list manifests for + * `registry.digitalocean.com/example/my/repo`, the path would be + * `/v2/registry/example/repositories/my%2Frepo/digests`. + */ + responses: { + 200: external["resources/registry/responses/repository_manifests.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_list_repositoryTags.yml": { + /** + * List All Container Registry Repository Tags + * @description To list all tags in your container registry repository, send a GET + * request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags`. + * + * Note that if your repository name contains `/` characters, it must be + * URL-encoded in the request URL. For example, to list tags for + * `registry.digitalocean.com/example/my/repo`, the path would be + * `/v2/registry/example/repositories/my%2Frepo/tags`. + */ + responses: { + 200: external["resources/registry/responses/repository_tags.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_run_garbageCollection.yml": { + /** + * Start Garbage Collection + * @description Garbage collection enables users to clear out unreferenced blobs (layer & + * manifest data) after deleting one or more manifests from a repository. If + * there are no unreferenced blobs resulting from the deletion of one or more + * manifests, garbage collection is effectively a noop. + * [See here for more information](https://www.digitalocean.com/docs/container-registry/how-to/clean-up-container-registry/) + * about how and why you should clean up your container registry periodically. + * + * To request a garbage collection run on your registry, send a POST request to + * `/v2/registry/$REGISTRY_NAME/garbage-collection`. This will initiate the + * following sequence of events on your registry. + * + * * Set the registry to read-only mode, meaning no further write-scoped + * JWTs will be issued to registry clients. Existing write-scoped JWTs will + * continue to work until they expire which can take up to 15 minutes. + * * Wait until all existing write-scoped JWTs have expired. + * * Scan all registry manifests to determine which blobs are unreferenced. + * * Delete all unreferenced blobs from the registry. + * * Record the number of blobs deleted and bytes freed, mark the garbage + * collection status as `success`. + * * Remove the read-only mode restriction from the registry, meaning write-scoped + * JWTs will once again be issued to registry clients. + */ + responses: { + 201: external["resources/registry/responses/garbage_collection.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_update_garbageCollection.yml": { + /** + * Update Garbage Collection + * @description To cancel the currently-active garbage collection for a registry, send a PUT request to `/v2/registry/$REGISTRY_NAME/garbage-collection/$GC_UUID` and specify one or more of the attributes below. + */ + requestBody: { + content: { + "application/json": external["resources/registry/models/update_registry.yml"]; + }; + }; + responses: { + 200: external["resources/registry/responses/garbage_collection.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_update_subscription.yml": { + /** + * Update Subscription Tier + * @description After creating your registry, you can switch to a different subscription tier to better suit your needs. To do this, send a POST request to `/v2/registry/subscription`. + */ + requestBody?: { + content: { + "application/json": { + /** + * @description The slug of the subscription tier to sign up for. + * @example basic + * @enum {string} + */ + tier_slug?: "starter" | "basic" | "professional"; + }; + }; + }; + responses: { + 200: external["resources/registry/responses/subscription_response.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/registry_validate_name.yml": { + /** + * Validate a Container Registry Name + * @description To validate that a container registry name is available for use, send a POST + * request to `/v2/registry/validate-name`. + * + * If the name is both formatted correctly and available, the response code will + * be 204 and contain no body. If the name is already in use, the response will + * be a 409 Conflict. + */ + requestBody: { + content: { + "application/json": external["resources/registry/models/validate_registry.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 409: external["shared/responses/conflict.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/registry/responses/all_repositories_v2.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + repositories?: (external["resources/registry/models/repository_v2.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/registry/responses/all_repositories.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + repositories?: (external["resources/registry/models/repository.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/registry/responses/docker_credentials.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["resources/registry/models/docker_credentials.yml"]; + }; + } + "resources/registry/responses/garbage_collection.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + garbage_collection?: external["resources/registry/models/garbage_collection.yml"]; + }; + }; + } + "resources/registry/responses/garbage_collections.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + garbage_collections?: (external["resources/registry/models/garbage_collection.yml"])[]; + }; + }; + } + "resources/registry/responses/registry_info.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + registry?: external["resources/registry/models/registry.yml"]; + }; + }; + } + "resources/registry/responses/registry_options_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + options?: { + /** + * @example [ + * "nyc3" + * ] + */ + available_regions?: (string)[]; + subscription_tiers?: (external["resources/registry/models/subscription_tier.yml"]["subscription_tier_base"] & external["resources/registry/models/subscription_tier.yml"]["subscription_tier_extended"])[]; + }; + }; + }; + } + "resources/registry/responses/repository_manifests.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + manifests?: (external["resources/registry/models/repository_manifest.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/registry/responses/repository_tags.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + tags?: (external["resources/registry/models/repository_tag.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/registry/responses/subscription_response.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + subscription?: external["resources/registry/models/subscription.yml"]; + }; + }; + } + "resources/reserved_ips/models/reserved_ip_actions.yml": Record + "resources/reserved_ips/models/reserved_ip_create.yml": OneOf<[{ + /** + * @description The ID of the Droplet that the reserved IP will be assigned to. + * @example 2457247 + */ + droplet_id: number; + }, { + /** + * @description The slug identifier for the region the reserved IP will be reserved to. + * @example nyc3 + */ + region: string; + /** + * Format: uuid + * @description The UUID of the project to which the reserved IP will be assigned. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + }]> + "resources/reserved_ips/models/reserved_ip.yml": { + /** + * Format: ipv4 + * @description The public IP address of the reserved IP. It also serves as its identifier. + * @example 45.55.96.47 + */ + ip?: string; + region?: external["resources/regions/models/region.yml"] & Record; + /** + * @description The Droplet that the reserved IP has been assigned to. When you query a reserved IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null. + * @example null + */ + droplet?: (Record | null) | external["resources/droplets/models/droplet.yml"]; + /** + * @description A boolean value indicating whether or not the reserved IP has pending actions preventing new ones from being submitted. + * @example true + */ + locked?: boolean; + /** + * Format: uuid + * @description The UUID of the project to which the reserved IP currently belongs. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + } + "resources/reserved_ips/parameters.yml": string + "resources/reserved_ips/reservedIPs_create.yml": { + /** + * Create a New Reserved IP + * @description On creation, a reserved IP must be either assigned to a Droplet or reserved to a region. + * * To create a new reserved IP assigned to a Droplet, send a POST + * request to `/v2/reserved_ips` with the `droplet_id` attribute. + * + * * To create a new reserved IP reserved to a region, send a POST request to + * `/v2/reserved_ips` with the `region` attribute. + * + * **Note**: In addition to the standard rate limiting, only 12 reserved IPs may be created per 60 seconds. + */ + requestBody: { + content: { + "application/json": external["resources/reserved_ips/models/reserved_ip_create.yml"]; + }; + }; + responses: { + 202: external["resources/reserved_ips/responses/reserved_ip_created.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPs_delete.yml": { + /** + * Delete a Reserved IPs + * @description To delete a reserved IP and remove it from your account, send a DELETE request + * to `/v2/reserved_ips/$RESERVED_IP_ADDR`. + * + * A successful request will receive a 204 status code with no body in response. + * This indicates that the request was processed successfully. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPs_get.yml": { + /** + * Retrieve an Existing Reserved IP + * @description To show information about a reserved IP, send a GET request to `/v2/reserved_ips/$RESERVED_IP_ADDR`. + */ + responses: { + 200: external["resources/reserved_ips/responses/reserved_ip.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPs_list.yml": { + /** + * List All Reserved IPs + * @description To list all of the reserved IPs available on your account, send a GET request to `/v2/reserved_ips`. + */ + responses: { + 200: external["resources/reserved_ips/responses/reserved_ip_list.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPsActions_get.yml": { + /** + * Retrieve an Existing Reserved IP Action + * @description To retrieve the status of a reserved IP action, send a GET request to `/v2/reserved_ips/$RESERVED_IP/actions/$ACTION_ID`. + */ + responses: { + 200: external["resources/reserved_ips/responses/reserved_ip_action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPsActions_list.yml": { + /** + * List All Actions for a Reserved IP + * @description To retrieve all actions that have been executed on a reserved IP, send a GET request to `/v2/reserved_ips/$RESERVED_IP/actions`. + */ + responses: { + 200: external["resources/reserved_ips/responses/reserved_ip_actions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/reservedIPsActions_post.yml": { + /** + * Initiate a Reserved IP Action + * @description To initiate an action on a reserved IP send a POST request to + * `/v2/reserved_ips/$RESERVED_IP/actions`. In the JSON body to the request, + * set the `type` attribute to on of the supported action types: + * + * | Action | Details + * |------------|-------- + * | `assign` | Assigns a reserved IP to a Droplet + * | `unassign` | Unassign a reserved IP from a Droplet + */ + /** + * @description The `type` attribute set in the request body will specify the action that + * will be taken on the reserved IP. + */ + requestBody?: { + content: { + "application/json": external["resources/reserved_ips/models/reserved_ip_actions.yml"]["reserved_ip_action_unassign"] | external["resources/reserved_ips/models/reserved_ip_actions.yml"]["reserved_ip_action_assign"]; + }; + }; + responses: { + 201: external["resources/reserved_ips/responses/reserved_ip_action.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/reserved_ips/responses/examples.yml": unknown + "resources/reserved_ips/responses/reserved_ip_action.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + action?: external["resources/actions/models/action.yml"] & { + /** + * Format: uuid + * @description The UUID of the project to which the reserved IP currently belongs. + * @example 746c6152-2fa2-11ed-92d3-27aaa54e4988 + */ + project_id?: string; + }; + }; + }; + } + "resources/reserved_ips/responses/reserved_ip_actions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/actions/models/action.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/reserved_ips/responses/reserved_ip_created.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + reserved_ip?: external["resources/reserved_ips/models/reserved_ip.yml"]; + links?: { + droplets?: (external["shared/models/action_link.yml"])[]; + actions?: (external["shared/models/action_link.yml"])[]; + }; + }; + }; + } + "resources/reserved_ips/responses/reserved_ip_list.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + reserved_ips?: (external["resources/reserved_ips/models/reserved_ip.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/reserved_ips/responses/reserved_ip.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + reserved_ip?: external["resources/reserved_ips/models/reserved_ip.yml"]; + }; + }; + } + "resources/sizes/models/size.yml": { + /** + * @description A human-readable string that is used to uniquely identify each size. + * @example s-1vcpu-1gb + */ + slug: string; + /** + * @description The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. + * @example 1024 + */ + memory: number; + /** + * @description The integer of number CPUs allocated to Droplets of this size. + * @example 1 + */ + vcpus: number; + /** + * @description The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. + * @example 25 + */ + disk: number; + /** + * Format: float + * @description The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. + * @example 1 + */ + transfer: number; + /** + * Format: float + * @description This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. + * @example 5 + */ + price_monthly: number; + /** + * Format: float + * @description This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. + * @example 0.00743999984115362 + */ + price_hourly: number; + /** + * @description An array containing the region slugs where this size is available for Droplet creates. + * @example [ + * "ams2", + * "ams3", + * "blr1", + * "fra1", + * "lon1", + * "nyc1", + * "nyc2", + * "nyc3", + * "sfo1", + * "sfo2", + * "sfo3", + * "sgp1", + * "tor1" + * ] + */ + regions: (string)[]; + /** + * @description This is a boolean value that represents whether new Droplets can be created with this size. + * @default true + * @example true + */ + available: boolean; + /** + * @description A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. + * @example Basic + */ + description: string; + } + "resources/sizes/responses/all_sizes.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + sizes: (external["resources/sizes/models/size.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/sizes/sizes_list.yml": { + /** + * List All Droplet Sizes + * @description To list all of available Droplet sizes, send a GET request to `/v2/sizes`. + * The response will be a JSON object with a key called `sizes`. The value of this will be an array of `size` objects each of which contain the standard size attributes. + */ + responses: { + 200: external["resources/sizes/responses/all_sizes.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/snapshots/models/snapshots_base.yml": { + /** + * @description A human-readable name for the snapshot. + * @example web-01-1595954862243 + */ + name: string; + /** + * Format: date-time + * @description A time value given in ISO8601 combined date and time format that represents when the snapshot was created. + * @example 2020-07-28T16:47:44Z + */ + created_at: string; + /** + * @description An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. + * @example [ + * "nyc3", + * "sfo3" + * ] + */ + regions: (string)[]; + /** + * @description The minimum size in GB required for a volume or Droplet to use this snapshot. + * @example 25 + */ + min_disk_size: number; + /** + * Format: float + * @description The billable size of the snapshot in gigabytes. + * @example 2.34 + */ + size_gigabytes: number; + } + "resources/snapshots/models/snapshots.yml": { + /** + * @description The unique identifier for the snapshot. + * @example 6372321 + */ + id: string; + } & external["resources/snapshots/models/snapshots_base.yml"] & ({ + /** + * @description The unique identifier for the resource that the snapshot originated from. + * @example 200776916 + */ + resource_id: string; + /** + * @description The type of resource that the snapshot originated from. + * @example droplet + * @enum {string} + */ + resource_type: "droplet" | "volume"; + /** + * @description An array of Tags the snapshot has been tagged with. + * @example [ + * "web", + * "env:prod" + * ] + */ + tags: (string)[]; + }) + "resources/snapshots/parameters.yml": string + "resources/snapshots/responses/examples.yml": unknown + "resources/snapshots/responses/snapshots_existing.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + snapshot?: external["resources/snapshots/models/snapshots.yml"]; + }; + }; + } + "resources/snapshots/responses/snapshots.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + snapshots?: (external["resources/snapshots/models/snapshots.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/snapshots/snapshots_delete.yml": { + /** + * Delete a Snapshot + * @description Both Droplet and volume snapshots are managed through the `/v2/snapshots/` + * endpoint. To delete a snapshot, send a DELETE request to + * `/v2/snapshots/$SNAPSHOT_ID`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/snapshots/snapshots_get.yml": { + /** + * Retrieve an Existing Snapshot + * @description To retrieve information about a snapshot, send a GET request to + * `/v2/snapshots/$SNAPSHOT_ID`. + * + * The response will be a JSON object with a key called `snapshot`. The value of + * this will be an snapshot object containing the standard snapshot attributes. + */ + responses: { + 200: external["resources/snapshots/responses/snapshots_existing.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/snapshots/snapshots_list.yml": { + /** + * List All Snapshots + * @description To list all of the snapshots available on your account, send a GET request to + * `/v2/snapshots`. + * + * The response will be a JSON object with a key called `snapshots`. This will be + * set to an array of `snapshot` objects, each of which will contain the standard + * snapshot attributes. + * + * ### Filtering Results by Resource Type + * + * It's possible to request filtered results by including certain query parameters. + * + * #### List Droplet Snapshots + * + * To retrieve only snapshots based on Droplets, include the `resource_type` + * query parameter set to `droplet`. For example, `/v2/snapshots?resource_type=droplet`. + * + * #### List Volume Snapshots + * + * To retrieve only snapshots based on volumes, include the `resource_type` + * query parameter set to `volume`. For example, `/v2/snapshots?resource_type=volume`. + */ + responses: { + 200: external["resources/snapshots/responses/snapshots.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/ssh_keys/attributes/ssh_key_fingerprint.yml": string + "resources/ssh_keys/attributes/ssh_key_id.yml": number + "resources/ssh_keys/attributes/ssh_key_name.yml": string + "resources/ssh_keys/links/sshKeys_delete_by_fingerprint.yml": never + "resources/ssh_keys/links/sshKeys_delete_by_id.yml": never + "resources/ssh_keys/links/sshKeys_get_by_fingerprint.yml": never + "resources/ssh_keys/links/sshKeys_get_by_id.yml": never + "resources/ssh_keys/models/sshKeys.yml": { + id?: external["resources/ssh_keys/attributes/ssh_key_id.yml"]; + fingerprint?: external["resources/ssh_keys/attributes/ssh_key_fingerprint.yml"]; + /** + * @description The entire public key string that was uploaded. Embedded into the root user's `authorized_keys` file if you include this key during Droplet creation. + * @example ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example + */ + public_key: string; + name: external["resources/ssh_keys/attributes/ssh_key_name.yml"]; + } + "resources/ssh_keys/parameters/ssh_key_identifier.yml": external["resources/ssh_keys/attributes/ssh_key_id.yml"] | external["resources/ssh_keys/attributes/ssh_key_fingerprint.yml"] + "resources/ssh_keys/responses/sshKeys_all.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + ssh_keys?: (external["resources/ssh_keys/models/sshKeys.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/ssh_keys/responses/sshKeys_existing.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + ssh_key?: external["resources/ssh_keys/models/sshKeys.yml"]; + }; + }; + } + "resources/ssh_keys/responses/sshKeys_new.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + ssh_key?: external["resources/ssh_keys/models/sshKeys.yml"]; + }; + }; + } + "resources/ssh_keys/sshKeys_create.yml": { + /** + * Create a New SSH Key + * @description To add a new SSH public key to your DigitalOcean account, send a POST request to `/v2/account/keys`. Set the `name` attribute to the name you wish to use and the `public_key` attribute to the full public key you are adding. + */ + requestBody: { + content: { + "application/json": external["resources/ssh_keys/models/sshKeys.yml"]; + }; + }; + responses: { + 201: external["resources/ssh_keys/responses/sshKeys_new.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/ssh_keys/sshKeys_delete.yml": { + /** + * Delete an SSH Key + * @description To destroy a public SSH key that you have in your account, send a DELETE request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`. + * A 204 status will be returned, indicating that the action was successful and that the response body is empty. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/ssh_keys/sshKeys_get.yml": { + /** + * Retrieve an Existing SSH Key + * @description To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`. + * The response will be a JSON object with the key `ssh_key` and value an ssh_key object which contains the standard ssh_key attributes. + */ + responses: { + 200: external["resources/ssh_keys/responses/sshKeys_existing.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/ssh_keys/sshKeys_list.yml": { + /** + * List All SSH Keys + * @description To list all of the keys in your account, send a GET request to `/v2/account/keys`. The response will be a JSON object with a key set to `ssh_keys`. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes. + */ + responses: { + 200: external["resources/ssh_keys/responses/sshKeys_all.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/ssh_keys/sshKeys_update.yml": { + /** + * Update an SSH Key's Name + * @description To update the name of an SSH key, send a PUT request to either `/v2/account/keys/$SSH_KEY_ID` or `/v2/account/keys/$SSH_KEY_FINGERPRINT`. Set the `name` attribute to the new name you want to use. + */ + /** @description Set the `name` attribute to the new name you want to use. */ + requestBody: { + content: { + "application/json": { + name?: external["resources/ssh_keys/attributes/ssh_key_name.yml"]; + }; + }; + }; + responses: { + 200: external["resources/ssh_keys/responses/sshKeys_existing.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/models/tags_metadata.yml": { + /** + * @description The number of tagged objects for this type of resource. + * @example 5 + */ + count?: number; + /** + * @description The URI for the last tagged object for this type of resource. + * @example https://api.digitalocean.com/v2/images/7555620 + */ + last_tagged_uri?: string; + } + "resources/tags/models/tags_resource.yml": { + /** + * @description An array of objects containing resource_id and resource_type attributes. + * @example [ + * { + * "resource_id": "9569411", + * "resource_type": "droplet" + * }, + * { + * "resource_id": "7555620", + * "resource_type": "image" + * }, + * { + * "resource_id": "3d80cb72-342b-4aaa-b92e-4e4abb24a933", + * "resource_type": "volume" + * } + * ] + */ + resources: ({ + /** + * @description The identifier of a resource. + * @example 3d80cb72-342b-4aaa-b92e-4e4abb24a933 + */ + resource_id?: string; + /** + * @description The type of the resource. + * @example volume + * @enum {string} + */ + resource_type?: "droplet" | "image" | "volume" | "volume_snapshot"; + })[]; + } + "resources/tags/models/tags.yml": { + /** + * @description The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. + * There is a limit of 255 characters per tag. + * + * **Note:** Tag names are case stable, which means the capitalization you use when you first create a tag is canonical. + * + * When working with tags in the API, you must use the tag's canonical capitalization. For example, if you create a tag named "PROD", the URL to add that tag to a resource would be `https://api.digitalocean.com/v2/tags/PROD/resources` (not `/v2/tags/prod/resources`). + * + * Tagged resources in the control panel will always display the canonical capitalization. For example, if you create a tag named "PROD", you can tag resources in the control panel by entering "prod". The tag will still display with its canonical capitalization, "PROD". + * + * @example extra-awesome + */ + name?: string; + /** + * @description An embedded object containing key value pairs of resource type and resource statistics. It also includes a count of the total number of resources tagged with the current tag as well as a `last_tagged_uri` attribute set to the last resource tagged with the current tag. + * @example { + * "count": 5, + * "last_tagged_uri": "https://api.digitalocean.com/v2/images/7555620", + * "droplets": { + * "count": 1, + * "last_tagged_uri": "https://api.digitalocean.com/v2/droplets/3164444" + * }, + * "images": { + * "count": 1, + * "last_tagged_uri": "https://api.digitalocean.com/v2/images/7555620" + * }, + * "volumes": { + * "count": 1, + * "last_tagged_uri": "https://api.digitalocean.com/v2/volumes/3d80cb72-342b-4aaa-b92e-4e4abb24a933" + * }, + * "volume_snapshots": { + * "count": 1, + * "last_tagged_uri": "https://api.digitalocean.com/v2/snapshots/1f6f46e8-6b60-11e9-be4e-0a58ac144519" + * }, + * "databases": { + * "count": 1, + * "last_tagged_uri": "https://api.digitalocean.com/v2/databases/b92438f6-ba03-416c-b642-e9236db91976" + * } + * } + */ + resources?: external["resources/tags/models/tags_metadata.yml"] & { + droplets?: external["resources/tags/models/tags_metadata.yml"]; + imgages?: external["resources/tags/models/tags_metadata.yml"]; + volumes?: external["resources/tags/models/tags_metadata.yml"]; + volume_snapshots?: external["resources/tags/models/tags_metadata.yml"]; + databases?: external["resources/tags/models/tags_metadata.yml"]; + }; + } + "resources/tags/parameters.yml": string + "resources/tags/responses/tags_all.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + tags?: (external["resources/tags/models/tags.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/tags/responses/tags_bad_request.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + "x-request-id"?: unknown; + }; + content: { + "application/json": external["shared/models/error_with_root_causes.yml"]; + }; + } + "resources/tags/responses/tags_existing.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + tag?: external["resources/tags/models/tags.yml"]; + }; + }; + } + "resources/tags/responses/tags_new.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + tag?: external["resources/tags/models/tags.yml"]; + }; + }; + } + "resources/tags/tags_assign_resources.yml": { + /** + * Tag a Resource + * @description Resources can be tagged by sending a POST request to `/v2/tags/$TAG_NAME/resources` with an array of json objects containing `resource_id` and `resource_type` attributes. + * Currently only tagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. `resource_type` is expected to be the string `droplet`, `database`, `image`, `volume` or `volume_snapshot`. `resource_id` is expected to be the ID of the resource as a string. + */ + requestBody: { + content: { + "application/json": external["resources/tags/models/tags_resource.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/tags_create.yml": { + /** + * Create a New Tag + * @description To create a tag you can send a POST request to `/v2/tags` with a `name` attribute. + */ + requestBody: { + content: { + "application/json": external["resources/tags/models/tags.yml"]; + }; + }; + responses: { + 201: external["resources/tags/responses/tags_new.yml"]; + 400: external["resources/tags/responses/tags_bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/tags_delete.yml": { + /** + * Delete a Tag + * @description A tag can be deleted by sending a `DELETE` request to `/v2/tags/$TAG_NAME`. Deleting a tag also untags all the resources that have previously been tagged by the Tag + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/tags_get.yml": { + /** + * Retrieve a Tag + * @description To retrieve an individual tag, you can send a `GET` request to `/v2/tags/$TAG_NAME`. + */ + responses: { + 200: external["resources/tags/responses/tags_existing.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/tags_list.yml": { + /** + * List All Tags + * @description To list all of your tags, you can send a GET request to `/v2/tags`. + */ + responses: { + 200: external["resources/tags/responses/tags_all.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/tags/tags_unassign_resources.yml": { + /** + * Untag a Resource + * @description Resources can be untagged by sending a DELETE request to `/v2/tags/$TAG_NAME/resources` with an array of json objects containing `resource_id` and `resource_type` attributes. + * Currently only untagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. `resource_type` is expected to be the string `droplet`, `database`, `image`, `volume` or `volume_snapshot`. `resource_id` is expected to be the ID of the resource as a string. + */ + requestBody: { + content: { + "application/json": external["resources/tags/models/tags_resource.yml"]; + }; + }; + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/create_alert.yml": { + /** + * Create a New Alert + * @description To create an Uptime alert, send a POST request to `/v2/uptime/checks/$CHECK_ID/alerts` specifying the attributes + * in the table below in the JSON body. + */ + /** + * @description The ''type'' field dictates the type of alert, and hence what type of value to pass into the threshold property. + * Type | Description | Threshold Value + * -----|-------------|-------------------- + * `latency` | alerts on the response latency | milliseconds + * `down` | alerts on a target registering as down in any region | N/A (Not required) + * `down_global` | alerts on a target registering as down globally | N/A (Not required) + * `ssl_expiry` | alerts on a SSL certificate expiring within $threshold days | days + */ + requestBody: { + content: { + "application/json": external["resources/uptime/models/alert.yml"]["alert"]; + }; + }; + responses: { + 201: external["resources/uptime/responses/existing_alert.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/create_check.yml": { + /** + * Create a New Check + * @description To create an Uptime check, send a POST request to `/v2/uptime/checks` specifying the attributes + * in the table below in the JSON body. + */ + requestBody: { + content: { + "application/json": external["resources/uptime/models/check.yml"]["check_updatable"]; + }; + }; + responses: { + 201: external["resources/uptime/responses/existing_check.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/delete_alert.yml": { + /** + * Delete an Alert + * @description To delete an Uptime alert, send a DELETE request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`. A 204 status + * code with no body will be returned in response to a successful request. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/delete_check.yml": { + /** + * Delete a Check + * @description To delete an Uptime check, send a DELETE request to `/v2/uptime/checks/$CHECK_ID`. A 204 status + * code with no body will be returned in response to a successful request. + * + * + * Deleting a check will also delete alerts associated with the check. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/get_alert.yml": { + /** + * Retrieve an Existing Alert + * @description To show information about an existing alert, send a GET request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`. + */ + responses: { + 200: external["resources/uptime/responses/existing_alert.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/get_check_state.yml": { + /** + * Retrieve Check State + * @description To show information about an existing check's state, send a GET request to `/v2/uptime/checks/$CHECK_ID/state`. + */ + responses: { + 200: external["resources/uptime/responses/existing_check_state.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/get_check.yml": { + /** + * Retrieve an Existing Check + * @description To show information about an existing check, send a GET request to `/v2/uptime/checks/$CHECK_ID`. + */ + responses: { + 200: external["resources/uptime/responses/existing_check.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/list_alerts.yml": { + /** + * List All Alerts + * @description To list all of the alerts for an Uptime check, send a GET request to `/v2/uptime/checks/$CHECK_ID/alerts`. + */ + responses: { + 200: external["resources/uptime/responses/all_alerts.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/list_checks.yml": { + /** + * List All Checks + * @description To list all of the Uptime checks on your account, send a GET request to `/v2/uptime/checks`. + */ + responses: { + 200: external["resources/uptime/responses/all_checks.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/models/alert.yml": Record + "resources/uptime/models/check.yml": Record + "resources/uptime/models/notification.yml": { + /** + * @description An email to notify on an alert trigger. + * @example [ + * "bob@example.com" + * ] + */ + email: (string)[]; + /** @description Slack integration details. */ + slack: ({ + /** + * Format: string + * @description Slack channel to notify of an alert trigger. + * @example Production Alerts + */ + channel: string; + /** + * Format: string + * @description Slack Webhook URL. + * @example https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ + */ + url: string; + })[]; + } + "resources/uptime/models/state.yml": Record + "resources/uptime/parameters.yml": string + "resources/uptime/responses/all_alerts.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + alerts?: (external["resources/uptime/models/alert.yml"]["alert"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/uptime/responses/all_checks.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + checks?: (external["resources/uptime/models/check.yml"]["check"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/uptime/responses/existing_alert.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + alert?: external["resources/uptime/models/alert.yml"]["alert"]; + }; + }; + } + "resources/uptime/responses/existing_check_state.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + state?: external["resources/uptime/models/state.yml"]["state"]; + }; + }; + } + "resources/uptime/responses/existing_check.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + check?: external["resources/uptime/models/check.yml"]["check"]; + }; + }; + } + "resources/uptime/update_alert.yml": { + /** + * Update an Alert + * @description To update the settings of an Uptime alert, send a PUT request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`. + */ + requestBody: { + content: { + "application/json": external["resources/uptime/models/alert.yml"]["alert_updatable"]; + }; + }; + responses: { + 200: external["resources/uptime/responses/existing_alert.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/uptime/update_check.yml": { + /** + * Update a Check + * @description To update the settings of an Uptime check, send a PUT request to `/v2/uptime/checks/$CHECK_ID`. + */ + requestBody: { + content: { + "application/json": external["resources/uptime/models/check.yml"]["check_updatable"]; + }; + }; + responses: { + 200: external["resources/uptime/responses/existing_check.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/examples.yml": unknown + "resources/volumes/models/attributes.yml": Record + "resources/volumes/models/volume_action_post_attach.yml": external["resources/volumes/models/volume_action_post_base.yml"] & { + droplet_id: external["resources/volumes/models/attributes.yml"]["volume_action_droplet_id"]; + tags?: external["shared/attributes/tags_array.yml"]; + } + "resources/volumes/models/volume_action_post_base.yml": { + /** + * @description The volume action to initiate. + * @example attach + * @enum {string} + */ + type: "attach" | "detach" | "resize"; + region?: external["shared/attributes/region_slug.yml"]; + } + "resources/volumes/models/volume_action_post_detach.yml": external["resources/volumes/models/volume_action_post_base.yml"] & { + droplet_id: external["resources/volumes/models/attributes.yml"]["volume_action_droplet_id"]; + } + "resources/volumes/models/volume_action_post_resize.yml": external["resources/volumes/models/volume_action_post_base.yml"] & { + /** @description The new size of the block storage volume in GiB (1024^3). */ + size_gigabytes: number; + } + "resources/volumes/models/volume_base.yml": { + /** + * @description The unique identifier for the block storage volume. + * @example 506f78a4-e098-11e5-ad9f-000f53306ae1 + */ + id?: string; + /** + * @description An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. + * @example [] + */ + droplet_ids?: readonly (number)[]; + /** + * @description A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. + * @example example + */ + name?: string; + /** + * @description An optional free-form text field to describe a block storage volume. + * @example Block store for examples + */ + description?: string; + /** + * @description The size of the block storage volume in GiB (1024^3). + * @example 10 + */ + size_gigabytes?: number; + /** + * @description A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. + * @example "2020-03-02T17:00:49.000Z" + */ + created_at?: string; + tags?: external["shared/attributes/tags_array.yml"]; + } + "resources/volumes/models/volume_full.yml": external["resources/volumes/models/volume_base.yml"] & ({ + /** + * @example { + * "name": "New York 1", + * "slug": "nyc1", + * "sizes": [ + * "s-1vcpu-1gb", + * "s-1vcpu-2gb", + * "s-1vcpu-3gb", + * "s-2vcpu-2gb", + * "s-3vcpu-1gb", + * "s-2vcpu-4gb", + * "s-4vcpu-8gb", + * "s-6vcpu-16gb", + * "s-8vcpu-32gb", + * "s-12vcpu-48gb", + * "s-16vcpu-64gb", + * "s-20vcpu-96gb", + * "s-24vcpu-128gb", + * "s-32vcpu-192gb" + * ], + * "features": [ + * "private_networking", + * "backups", + * "ipv6", + * "metadata" + * ], + * "available": true + * } + */ + region?: Record & external["resources/regions/models/region.yml"]; + /** + * @description The type of filesystem currently in-use on the volume. + * @example ext4 + */ + filesystem_type?: string; + /** + * @description The label currently applied to the filesystem. + * @example example + */ + filesystem_label?: string; + }) + "resources/volumes/models/volumeAction.yml": { + /** + * @description This is the type of action that the object represents. For example, this could be "attach_volume" to represent the state of a volume attach action. + * @example attach_volume + */ + type?: string; + /** @example null */ + resource_id?: number; + } & external["resources/actions/models/action.yml"] + "resources/volumes/models/volumes_ext4.yml": external["resources/volumes/models/volume_base.yml"] & external["resources/volumes/models/attributes.yml"]["volume_snapshot_id"] & external["resources/volumes/models/attributes.yml"]["volume_write_file_system_type"] & ({ + region: external["shared/attributes/region_slug.yml"]; + filesystem_label?: external["resources/volumes/models/attributes.yml"]["volume_write_file_system_label"] & Record; + }) + "resources/volumes/models/volumes_xfs.yml": external["resources/volumes/models/volume_base.yml"] & external["resources/volumes/models/attributes.yml"]["volume_snapshot_id"] & external["resources/volumes/models/attributes.yml"]["volume_write_file_system_type"] & ({ + region: external["shared/attributes/region_slug.yml"]; + filesystem_label?: external["resources/volumes/models/attributes.yml"]["volume_write_file_system_label"] & Record; + }) + "resources/volumes/parameters.yml": string + "resources/volumes/responses/volume.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + volume?: external["resources/volumes/models/volume_full.yml"]; + }; + }; + } + "resources/volumes/responses/volumeAction.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + action?: external["resources/volumes/models/volumeAction.yml"]; + }; + }; + } + "resources/volumes/responses/volumeActions.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + actions?: (external["resources/volumes/models/volumeAction.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/volumes/responses/volumes.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + /** @description Array of volumes. */ + volumes: (external["resources/volumes/models/volume_full.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/volumes/responses/volumeSnapshot.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + snapshot?: external["resources/snapshots/models/snapshots.yml"]; + }; + }; + } + "resources/volumes/responses/volumeSnapshots.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + snapshots?: (external["resources/snapshots/models/snapshots.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/volumes/volumeActions_get.yml": { + /** + * Retrieve an Existing Volume Action + * @description To retrieve the status of a volume action, send a GET request to `/v2/volumes/$VOLUME_ID/actions/$ACTION_ID`. + */ + responses: { + 200: external["resources/volumes/responses/volumeAction.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeActions_list.yml": { + /** + * List All Actions for a Volume + * @description To retrieve all actions that have been executed on a volume, send a GET request to `/v2/volumes/$VOLUME_ID/actions`. + */ + responses: { + 200: external["resources/volumes/responses/volumeActions.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeActions_post_byId.yml": { + /** + * Initiate A Block Storage Action By Volume Id + * @description To initiate an action on a block storage volume by Id, send a POST request to + * `~/v2/volumes/$VOLUME_ID/actions`. The body should contain the appropriate + * attributes for the respective action. + * + * ## Attach a Block Storage Volume to a Droplet + * + * | Attribute | Details | + * | ---------- | ------------------------------------------------------------------- | + * | type | This must be `attach` | + * | droplet_id | Set to the Droplet's ID | + * | region | Set to the slug representing the region where the volume is located | + * + * Each volume may only be attached to a single Droplet. However, up to seven + * volumes may be attached to a Droplet at a time. Pre-formatted volumes will be + * automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS + * Droplets created on or after April 26, 2018 when attached. On older Droplets, + * [additional configuration](https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-digitalocean-block-storage-volumes-in-linux#mounting-the-filesystems) + * is required. + * + * ## Remove a Block Storage Volume from a Droplet + * + * | Attribute | Details | + * | ---------- | ------------------------------------------------------------------- | + * | type | This must be `detach` | + * | droplet_id | Set to the Droplet's ID | + * | region | Set to the slug representing the region where the volume is located | + * + * ## Resize a Volume + * + * | Attribute | Details | + * | -------------- | ------------------------------------------------------------------- | + * | type | This must be `resize` | + * | size_gigabytes | The new size of the block storage volume in GiB (1024^3) | + * | region | Set to the slug representing the region where the volume is located | + * + * Volumes may only be resized upwards. The maximum size for a volume is 16TiB. + */ + requestBody: { + content: { + "application/json": external["resources/volumes/models/volume_action_post_attach.yml"] | external["resources/volumes/models/volume_action_post_detach.yml"] | external["resources/volumes/models/volume_action_post_resize.yml"]; + }; + }; + responses: { + 202: external["resources/volumes/responses/volumeAction.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeActions_post.yml": { + /** + * Initiate A Block Storage Action By Volume Name + * @description To initiate an action on a block storage volume by Name, send a POST request to + * `~/v2/volumes/actions`. The body should contain the appropriate + * attributes for the respective action. + * + * ## Attach a Block Storage Volume to a Droplet + * + * | Attribute | Details | + * | ----------- | ------------------------------------------------------------------- | + * | type | This must be `attach` | + * | volume_name | The name of the block storage volume | + * | droplet_id | Set to the Droplet's ID | + * | region | Set to the slug representing the region where the volume is located | + * + * Each volume may only be attached to a single Droplet. However, up to five + * volumes may be attached to a Droplet at a time. Pre-formatted volumes will be + * automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS + * Droplets created on or after April 26, 2018 when attached. On older Droplets, + * [additional configuration](https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-digitalocean-block-storage-volumes-in-linux#mounting-the-filesystems) + * is required. + * + * ## Remove a Block Storage Volume from a Droplet + * + * | Attribute | Details | + * | ----------- | ------------------------------------------------------------------- | + * | type | This must be `detach` | + * | volume_name | The name of the block storage volume | + * | droplet_id | Set to the Droplet's ID | + * | region | Set to the slug representing the region where the volume is located | + */ + requestBody: { + content: { + "application/json": external["resources/volumes/models/volume_action_post_attach.yml"] | external["resources/volumes/models/volume_action_post_detach.yml"]; + }; + }; + responses: { + 202: external["resources/volumes/responses/volumeAction.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumes_create.yml": { + /** + * Create a New Block Storage Volume + * @description To create a new volume, send a POST request to `/v2/volumes`. Optionally, a `filesystem_type` attribute may be provided in order to automatically format the volume's filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended. + */ + requestBody: { + content: { + "application/json": external["resources/volumes/models/volumes_ext4.yml"] | external["resources/volumes/models/volumes_xfs.yml"]; + }; + }; + responses: { + 201: external["resources/volumes/responses/volume.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumes_delete_byName.yml": { + /** + * Delete a Block Storage Volume by Name + * @description Block storage volumes may also be deleted by name by sending a DELETE request with the volume's **name** and the **region slug** for the region it is located in as query parameters to `/v2/volumes?name=$VOLUME_NAME®ion=nyc1`. + * No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumes_delete.yml": { + /** + * Delete a Block Storage Volume + * @description To delete a block storage volume, destroying all data and removing it from your account, send a DELETE request to `/v2/volumes/$VOLUME_ID`. + * No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumes_get.yml": { + /** + * Retrieve an Existing Block Storage Volume + * @description To show information about a block storage volume, send a GET request to `/v2/volumes/$VOLUME_ID`. + */ + responses: { + 200: external["resources/volumes/responses/volume.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumes_list.yml": { + /** + * List All Block Storage Volumes + * @description To list all of the block storage volumes available on your account, send a GET request to `/v2/volumes`. + * ## Filtering Results + * ### By Region + * The `region` may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: `/v2/volumes?region=nyc1` + * ### By Name + * It is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume's name as a query parameter to `/v2/volumes?name=$VOLUME_NAME`. + * **Note:** You can only create one volume per region with the same name. + * ### By Name and Region + * It is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume's name and the region slug for the region it is located in as query parameters to `/v2/volumes?name=$VOLUME_NAME®ion=nyc1`. + */ + responses: { + 200: external["resources/volumes/responses/volumes.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeSnapshots_create.yml": { + /** + * Create Snapshot from a Volume + * @description To create a snapshot from a volume, sent a POST request to `/v2/volumes/$VOLUME_ID/snapshots`. + */ + requestBody: { + content: { + /** + * @example { + * "name": "big-data-snapshot1475261774" + * } + */ + "application/json": { + /** + * @description A human-readable name for the volume snapshot. + * @example big-data-snapshot1475261774 + */ + name: string; + tags?: external["shared/attributes/tags_array.yml"]; + }; + }; + }; + responses: { + 201: external["resources/volumes/responses/volumeSnapshot.yml"]; + 400: external["shared/responses/bad_request.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeSnapshots_delete_byId.yml": { + /** + * Delete a Volume Snapshot + * @description To delete a volume snapshot, send a DELETE request to + * `/v2/snapshots/$SNAPSHOT_ID`. + * + * A status of 204 will be given. This indicates that the request was processed + * successfully, but that no response body is needed. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeSnapshots_get_byId.yml": { + /** + * Retrieve an Existing Volume Snapshot + * @description To retrieve the details of a snapshot that has been created from a volume, send a GET request to `/v2/volumes/snapshots/$SNAPSHOT_ID`. + */ + responses: { + 200: external["resources/volumes/responses/volumeSnapshot.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/volumes/volumeSnapshots_list.yml": { + /** + * List Snapshots for a Volume + * @description To retrieve the snapshots that have been created from a volume, send a GET request to `/v2/volumes/$VOLUME_ID/snapshots`. + */ + responses: { + 200: external["resources/volumes/responses/volumeSnapshots.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/models/vpc_member.yml": { + /** + * @description The name of the resource. + * @example nyc1-load-balancer-01 + */ + name?: string; + urn?: external["shared/attributes/urn.yml"]; + /** + * @description A time value given in ISO8601 combined date and time format that represents when the resource was created. + * @example 2020-03-13T19:30:48Z + */ + created_at?: string; + } + "resources/vpcs/models/vpc.yml": Record + "resources/vpcs/parameters.yml": string + "resources/vpcs/responses/all_vpcs.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + vpcs?: (external["resources/vpcs/models/vpc.yml"]["vpc"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/vpcs/responses/existing_vpc.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + vpc?: external["resources/vpcs/models/vpc.yml"]["vpc"]; + }; + }; + } + "resources/vpcs/responses/vpc_members.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": { + members?: (external["resources/vpcs/models/vpc_member.yml"])[]; + } & external["shared/pages.yml"]["pagination"] & external["shared/meta.yml"]; + }; + } + "resources/vpcs/vpcs_create.yml": { + /** + * Create a New VPC + * @description To create a VPC, send a POST request to `/v2/vpcs` specifying the attributes + * in the table below in the JSON body. + * + * **Note:** If you do not currently have a VPC network in a specific datacenter + * region, the first one that you create will be set as the default for that + * region. The default VPC for a region cannot be changed or deleted. + */ + requestBody: { + content: { + "application/json": external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_create"]; + }; + }; + responses: { + 201: external["resources/vpcs/responses/existing_vpc.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_delete.yml": { + /** + * Delete a VPC + * @description To delete a VPC, send a DELETE request to `/v2/vpcs/$VPC_ID`. A 204 status + * code with no body will be returned in response to a successful request. + * + * The default VPC for a region can not be deleted. Additionally, a VPC can only + * be deleted if it does not contain any member resources. Attempting to delete + * a region's default VPC or a VPC that still has members will result in a + * 403 Forbidden error response. + */ + responses: { + 204: external["shared/responses/no_content.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_get.yml": { + /** + * Retrieve an Existing VPC + * @description To show information about an existing VPC, send a GET request to `/v2/vpcs/$VPC_ID`. + */ + responses: { + 200: external["resources/vpcs/responses/existing_vpc.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_list_members.yml": { + /** + * List the Member Resources of a VPC + * @description To list all of the resources that are members of a VPC, send a GET request to + * `/v2/vpcs/$VPC_ID/members`. + * + * To only list resources of a specific type that are members of the VPC, + * included a `resource_type` query parameter. For example, to only list Droplets + * in the VPC, send a GET request to `/v2/vpcs/$VPC_ID/members?resource_type=droplet`. + */ + responses: { + 200: external["resources/vpcs/responses/vpc_members.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_list.yml": { + /** + * List All VPCs + * @description To list all of the VPCs on your account, send a GET request to `/v2/vpcs`. + */ + responses: { + 200: external["resources/vpcs/responses/all_vpcs.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_patch.yml": { + /** + * Partially Update a VPC + * @description To update a subset of information about a VPC, send a PATCH request to + * `/v2/vpcs/$VPC_ID`. + */ + requestBody: { + content: { + "application/json": external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_default"]; + }; + }; + responses: { + 200: external["resources/vpcs/responses/existing_vpc.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "resources/vpcs/vpcs_update.yml": { + /** + * Update a VPC + * @description To update information about a VPC, send a PUT request to `/v2/vpcs/$VPC_ID`. + */ + requestBody: { + content: { + "application/json": external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_default"]; + }; + }; + responses: { + 200: external["resources/vpcs/responses/existing_vpc.yml"]; + 401: external["shared/responses/unauthorized.yml"]; + 404: external["shared/responses/not_found.yml"]; + 429: external["shared/responses/too_many_requests.yml"]; + 500: external["shared/responses/server_error.yml"]; + default: external["shared/responses/unexpected_error.yml"]; + }; + } + "shared/attributes/distribution.yml": "Arch Linux" | "CentOS" | "CoreOS" | "Debian" | "Fedora" | "Fedora Atomic" | "FreeBSD" | "Gentoo" | "openSUSE" | "RancherOS" | "Rocky Linux" | "Ubuntu" | "Unknown" + "shared/attributes/region_slug.yml": string + "shared/attributes/regions_array.yml": (external["shared/attributes/region_slug.yml"])[] + "shared/attributes/tags_array.yml": (string)[] + "shared/attributes/urn.yml": string + "shared/headers.yml": Record + "shared/meta_optional_total.yml": { + meta: external["shared/models/meta_properties.yml"]; + } + "shared/meta.yml": { + meta: external["shared/models/meta_properties.yml"] & Record; + } + "shared/models/action_link.yml": { + /** + * @description A unique numeric ID that can be used to identify and reference an action. + * @example 7515 + */ + id?: number; + /** + * @description A string specifying the type of the related action. + * @example create + */ + rel?: string; + /** + * Format: uri + * @description A URL that can be used to access the action. + * @example https://api.digitalocean.com/v2/actions/7515 + */ + href?: string; + } + "shared/models/error_with_root_causes.yml": { + /** + * @description A message providing information about the error. + * @example not_found + */ + error: string; + /** + * @description A list of error messages. + * @example null + */ + messages?: (string)[]; + /** + * @description A list of underlying causes for the error, including details to help resolve it when possible. + * @example [] + */ + root_causes: (string)[]; + } + "shared/models/error.yml": { + /** + * @description A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." + * @example not_found + */ + id: string; + /** + * @description A message providing additional information about the error, including details to help resolve it when possible. + * @example The resource you were accessing could not be found. + */ + message: string; + /** + * @description Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. + * @example 4d9d8375-3c56-4925-a3e7-eb137fed17e9 + */ + request_id?: string; + } + "shared/models/meta_properties.yml": { + /** + * @description Number of objects returned by the request. + * @example 1 + */ + total?: number; + } + "shared/pages.yml": Record + "shared/parameters.yml": string + "shared/responses/accepted.yml": never + "shared/responses/bad_request.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/conflict.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/no_content_with_content_type.yml": never + "shared/responses/no_content.yml": never + "shared/responses/not_found.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/server_error.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/too_many_requests.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/unauthorized.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } + "shared/responses/unexpected_error.yml": { + headers: { + "ratelimit-limit": external["shared/headers.yml"]["ratelimit-limit"]; + "ratelimit-remaining": external["shared/headers.yml"]["ratelimit-remaining"]; + "ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"]; + }; + content: { + "application/json": external["shared/models/error.yml"]; + }; + } +} + +export type operations = Record; diff --git a/examples/github-api-next.ts b/examples/github-api-next.ts new file mode 100644 index 000000000..72a49452d --- /dev/null +++ b/examples/github-api-next.ts @@ -0,0 +1,102841 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +/** 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"]; + }; + "/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/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** + * 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/installations": { + /** + * List installations for the authenticated app + * @description You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + 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/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * Create an installation access token for an app + * @description Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 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 application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** + * Check a token + * @description OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + post: operations["apps/check-token"]; + /** + * Delete an app token + * @description OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + delete: operations["apps/delete-token"]; + /** + * Reset a token + * @description OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** + * Create a scoped access token + * @description Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + 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`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + /** Get all codes of conduct */ + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + /** Get a 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"]; + }; + "/enterprise-installation/{enterprise_or_org}/server-statistics": { + /** + * Get GitHub Enterprise Server statistics + * @description Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + get: operations["enterprise-admin/get-server-statistics"]; + }; + "/enterprises/{enterprise}/actions/cache/usage": { + /** + * Get GitHub Actions cache usage for an enterprise + * @description Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions": { + /** + * Get GitHub Actions permissions for an enterprise + * @description Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-github-actions-permissions-enterprise"]; + /** + * Set GitHub Actions permissions for an enterprise + * @description Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-github-actions-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations": { + /** + * List selected organizations enabled for GitHub Actions in an enterprise + * @description Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; + /** + * Set selected organizations enabled for GitHub Actions in an enterprise + * @description Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Enable a selected organization for GitHub Actions in an enterprise + * @description Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + /** + * Disable a selected organization for GitHub Actions in an enterprise + * @description Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/selected-actions": { + /** + * Get allowed actions and reusable workflows for an enterprise + * @description Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-allowed-actions-enterprise"]; + /** + * Set allowed actions and reusable workflows for an enterprise + * @description Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-allowed-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/workflow": { + /** + * Get default workflow permissions for an enterprise + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-enterprise"]; + /** + * Set default workflow permissions for an enterprise + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * List self-hosted runner groups for an enterprise + * @description Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Create a self-hosted runner group for an enterprise + * @description Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Get a self-hosted runner group for an enterprise + * @description Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + /** + * Delete a self-hosted runner group from an enterprise + * @description Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"]; + /** + * Update a self-hosted runner group for an enterprise + * @description Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { + /** + * List organization access to a self-hosted runner group in an enterprise + * @description Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Set organization access for a self-hosted runner group in an enterprise + * @description Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Add organization access to a self-hosted runner group in an enterprise + * @description Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Remove organization access to a self-hosted runner group in an enterprise + * @description Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { + /** + * List self-hosted runners in a group for an enterprise + * @description Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"]; + /** + * Set self-hosted runners in a group for an enterprise + * @description Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Add a self-hosted runner to a group for an enterprise + * @description Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"]; + /** + * Remove a self-hosted runner from a group for an enterprise + * @description Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners": { + /** + * List self-hosted runners for an enterprise + * @description Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/downloads": { + /** + * List runner applications for an enterprise + * @description Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-runner-applications-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/registration-token": { + /** + * Create a registration token for an enterprise + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-registration-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/remove-token": { + /** + * Create a remove token for an enterprise + * @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-remove-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Get a self-hosted runner for an enterprise + * @description Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"]; + /** + * Delete a self-hosted runner from an enterprise + * @description Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * List labels for a self-hosted runner for an enterprise + * @description Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Set custom labels for a self-hosted runner for an enterprise + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner for an enterprise + * @description Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + /** + * Remove all custom labels from a self-hosted runner for an enterprise + * @description Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner for an enterprise + * @description Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code-scanning/alerts": { + /** + * List code scanning alerts for an enterprise + * @description Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + get: operations["code-scanning/list-alerts-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. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. 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)." + */ + 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. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/settings/billing/advanced-security": { + /** + * Get GitHub Advanced Security active committers for an enterprise + * @description Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-ghe"]; + }; + "/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 GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** + * 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/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** + * List starred gists + * @description List the authenticated user's starred gists: + */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + /** Get a gist */ + 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 */ + get: operations["gists/list-comments"]; + /** Create a gist comment */ + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + /** Get a gist comment */ + get: operations["gists/get-comment"]; + /** Delete a gist comment */ + delete: operations["gists/delete-comment"]; + /** Update a gist comment */ + 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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["gists/star"]; + /** Unstar a gist */ + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + /** Get a gist revision */ + 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/reference/repos#create-a-repository-for-the-authenticated-user). + */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * Get a gitignore template + * @description The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories accessible to the app installation + * @description List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + 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/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user + * @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/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + /** Get all commonly used licenses */ + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + /** Get a license */ + 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/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + /** 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/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** + * Get a thread + * @description Gets information about a notification thread. + */ + get: operations["activity/get-thread"]; + /** + * 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/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * 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/reference/activity#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/reference/activity#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 on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/organizations/{organization_id}/custom_roles": { + /** + * List custom repository roles in an organization + * @description List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + get: operations["orgs/list-custom-roles"]; + }; + "/orgs/{org}": { + /** + * Get an organization + * @description To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * Update an organization + * @description **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + 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. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * List repositories with GitHub Actions cache usage for an organization + * @description Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * 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. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * List selected repositories enabled for GitHub Actions in an organization + * @description Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Enable a selected repository for GitHub Actions in an organization + * @description Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * 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)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * 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)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * 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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * 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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * List self-hosted runner groups for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Create a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Get a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Delete a self-hosted runner group from an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Update a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * List repository access to a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Set repository access for a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Remove repository access to a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * List self-hosted runners in a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Set self-hosted runners in a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Add a self-hosted runner to a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Remove a self-hosted runner from a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * List self-hosted runners for an organization + * @description Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Create a registration token for an organization + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Get a self-hosted runner for an organization + * @description Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * List labels for a self-hosted runner for an organization + * @description Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner for an organization + * @description Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** + * List organization secrets + * @description Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + 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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + 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 [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** + * List selected repositories for an organization secret + * @description Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + 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/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Add selected repository to an organization secret + * @description Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + 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/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/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 */ + get: operations["orgs/check-blocked-user"]; + /** Block a user from an organization */ + put: operations["orgs/block-user"]; + /** Unblock a user from an 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)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Manage access control for organization codespaces + * @description Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * List organization secrets + * @description Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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. You must authenticate using an access token with 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 secret without revealing its encrypted value. + * You must authenticate using an access token with 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 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. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** + * Delete an organization secret + * @description Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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`. You must authenticate using an access token with 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 secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with 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 secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with 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 secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/custom_roles": { + /** + * Create a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + post: operations["orgs/create-custom-role"]; + }; + "/orgs/{org}/custom_roles/{role_id}": { + /** + * Get a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Gets a custom repository role that is available to all repositories owned by the organization. + * + * To use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + get: operations["orgs/get-custom-role"]; + /** + * Delete a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + delete: operations["orgs/delete-custom-role"]; + /** + * Update a custom role + * @description **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + patch: operations["orgs/update-custom-role"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * List Dependabot alerts for an organization + * @description Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + 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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + 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 [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** + * List selected repositories for an organization secret + * @description Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + 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/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Add selected repository to an organization secret + * @description Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + 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/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + /** 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}/fine_grained_permissions": { + /** + * List fine-grained permissions for an organization + * @description **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + get: operations["orgs/list-fine-grained-permissions"]; + }; + "/orgs/{org}/hooks": { + /** List organization webhooks */ + get: operations["orgs/list-webhooks"]; + /** + * Create an organization webhook + * @description Here's how you can create a hook that posts payloads in JSON format: + */ + 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/reference/orgs#get-a-webhook-configuration-for-an-organization)." + */ + get: operations["orgs/get-webhook"]; + /** Delete an organization webhook */ + 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/reference/orgs#update-a-webhook-configuration-for-an-organization)." + */ + 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/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * 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/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** + * List deliveries for an organization webhook + * @description Returns a list of webhook deliveries for a webhook configured in an organization. + */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** + * Get a webhook delivery for an organization webhook + * @description Returns a delivery for a webhook configured in an organization. + */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for an organization webhook + * @description Redeliver a delivery for a webhook configured in an organization. + */ + 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. + */ + 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. You must be an organization owner with `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`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation + * @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/reference/pulls#list-pull-requests)" endpoint. + */ + 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. + * + * You must authenticate using an access token with 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. + * + * You must authenticate using an access token with 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/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/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + 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/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** + * List repositories in an organization migration + * @description List all the repositories for this organization migration. + */ + get: operations["migrations/list-repos-for-org"]; + }; + "/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/enterprise-cloud@latest/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 all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Get a package for an organization + * @description Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restore a package for an organization + * @description Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for an organization + * @description Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore package version for an organization + * @description Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/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}/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 */ + 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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + /** Remove public organization membership for the authenticated user */ + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * List organization repositories + * @description Lists repositories for the specified 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 scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * List secret scanning alerts for an organization + * @description Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/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)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission 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." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission 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." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission 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)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/advanced-security": { + /** + * Get GitHub Advanced Security active committers for an organization + * @description Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-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)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + 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)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/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`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * 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. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Create a discussion + * @description Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a discussion + * @description Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion + * @description Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * Update a discussion + * @description Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + 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. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Create a discussion comment + * @description Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a discussion comment + * @description Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Delete a discussion comment + * @description Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Update a discussion comment + * @description Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + 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/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create reaction for a team discussion comment + * @description Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + 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/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List reactions for a team discussion + * @description List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + 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/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * Delete team discussion reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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 see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Add or update team membership for a user + * @description Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub 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 Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * 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. + * + * **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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/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 repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + /** Get a project card */ + get: operations["projects/get-card"]; + /** Delete 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 */ + get: operations["projects/get-column"]; + /** Delete 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 */ + 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 */ + get: operations["projects/list-columns"]; + /** Create a 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. + * + * **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. + */ + get: operations["repos/get"]; + /** + * Delete a repository + * @description Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** + * Update a repository + * @description **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. + */ + 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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** + * Get an artifact + * @description Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-artifact"]; + /** + * Delete an artifact + * @description Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + 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`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/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, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * List GitHub Actions caches for a repository + * @description Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-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 you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Download job logs for a workflow run + * @description Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + 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. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * 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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * 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. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/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 internal repositories. For more information, see "[Managing GitHub Actions settings for a 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-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Set the level of access for workflows outside of the repository + * @description Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * 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)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** + * List self-hosted runners for a repository + * @description Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Create a registration token for a repository + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Create a remove token for a repository + * @description Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Get a self-hosted runner for a repository + * @description Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * List labels for a self-hosted runner for a repository + * @description Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner for a repository + * @description Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner for a repository + * @description Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** + * Get a workflow run + * @description Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a workflow run + * @description Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + 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. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** + * List workflow run artifacts + * @description Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 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. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** + * List jobs for a workflow run attempt + * @description Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + */ + 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 you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** + * Cancel a workflow run + * @description Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** + * List jobs for a workflow run + * @description Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + */ + 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 you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** + * Delete workflow run logs + * @description Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + 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, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * 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. Required reviewers must authenticate using an access token with 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`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/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. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + 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 you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + 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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-secret"]; + }; + "/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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** + * Get a workflow + * @description Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 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`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * Create a workflow dispatch event + * @description You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + 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`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List workflow runs for a workflow + * @description List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * 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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** + * 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": { + /** + * List all autolinks of a repository + * @description This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** + * 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": { + /** + * 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 installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * 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 installed GitHub Apps with `write` access to the `contents` permission 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 installed GitHub Apps with `write` access to the `contents` permission 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 installed GitHub Apps with `write` access to the `contents` permission 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. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Add team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 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. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * 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 permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * 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 **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/get"]; + /** + * Update a check run + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + 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`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. + */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Rerequest a check run + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * Create a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + 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/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * Get a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * List check runs in a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * 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. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * List code scanning alerts for a repository + * @description Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + 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. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + get: operations["code-scanning/get-alert"]; + /** + * Update a code scanning alert + * @description Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + */ + 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. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * 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. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Get a code scanning analysis for a repository + * @description Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Delete a code scanning analysis from a repository + * @description Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * 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. + */ + 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. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + 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. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/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. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** + * Get information about a SARIF upload + * @description Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission 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 you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission 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 secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + get: operations["codespaces/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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of 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 of 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 of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission 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. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * Check if a user is a repository collaborator + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). + * + * **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 */ + 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`. + */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * List commit comments for a repository + * @description Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + /** Get a commit comment */ + get: operations["repos/get-commit-comment"]; + /** Delete a commit comment */ + delete: operations["repos/delete-commit-comment"]; + /** Update a commit comment */ + 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/reference/repos#comments). + */ + 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/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete a commit comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + 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 her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * 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 Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** + * List pull requests associated with a commit + * @description Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results only include open pull requests. + */ + 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, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * List check runs for a Git reference + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * List check suites for a Git reference + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + 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 must be public, and 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 + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compare two commits + * @description The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/compare-commits"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * Get repository content + * @description Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * The response will be an array of objects, one object for each item in the directory. + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value + * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). + * In the next major version of the API, the type will be returned as "submodule". + * + * #### If the content is a symlink + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the + * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific + * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out + * the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the + * github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + get: operations["repos/get-content"]; + /** + * Create or update file contents + * @description Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/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 You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * Get a Dependabot alert + * @description You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * Update a Dependabot alert + * @description You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + 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. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/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 you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + 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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + 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/snapshots": { + /** + * Create a snapshot of dependencies for a repository + * @description Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. + */ + 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. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. + * + * #### Merged branch response + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * #### Merge conflict response + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * #### Failed commit status checks + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + /** Get 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. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** + * 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. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** + * 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 endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * List environments + * @description Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 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. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment + * @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 "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** + * Delete an environment + * @description You must authenticate using an access token with the repo scope to use this endpoint. + */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * List deployment branch policies + * @description Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Create a deployment branch policy + * @description Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 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 policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Update a deployment branch policy + * @description Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Delete a deployment branch policy + * @description Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + /** List repository events */ + 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). + */ + 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. + * + * _Note_: This API 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/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * Get a commit + * @description Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 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/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * 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/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** + * 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 */ + delete: operations["git/delete-ref"]; + /** Update a reference */ + 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/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * Get a tag + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 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/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Get a tree + * @description Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + 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/reference/repos#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/reference/repos#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/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * 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/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** + * 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 + * @description View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + get: operations["migrations/get-import-status"]; + /** + * Start an import + * @description Start a source import to a GitHub repository using GitHub Importer. + */ + put: operations["migrations/start-import"]; + /** + * Cancel an import + * @description Stop an import for a repository. + */ + delete: operations["migrations/cancel-import"]; + /** + * Update an import + * @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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * Get commit authors + * @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/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** + * Map a commit author + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** + * Get large files + * @description List files larger than 100MB found during the import + */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** + * Update Git LFS preference + * @description You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). + */ + 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/reference/pulls#list-pull-requests)" endpoint. + */ + 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** + * List issue comments for a repository + * @description By default, Issue Comments are ordered by ascending ID. + */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + /** Get an issue comment */ + get: operations["issues/get-comment"]; + /** Delete an issue comment */ + delete: operations["issues/delete-comment"]; + /** Update an issue comment */ + 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/reference/issues#comments). + */ + 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/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete an issue comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + /** List issue events for a repository */ + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + /** Get an issue event */ + 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/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** + * Update an issue + * @description Issue owners and users with push access can edit an issue. + */ + 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}/comments": { + /** + * List issue comments + * @description Issue Comments are ordered by ascending ID. + */ + get: operations["issues/list-comments"]; + /** + * Create an issue comment + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + /** List issue events */ + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + /** List 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 */ + post: operations["issues/add-labels"]; + /** Remove 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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 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/reference/issues). + */ + get: operations["reactions/list-for-issue"]; + /** + * Create reaction for an issue + * @description Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + 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/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + /** List 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 */ + get: operations["issues/list-labels-for-repo"]; + /** Create a label */ + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + /** Get a label */ + get: operations["issues/get-label"]; + /** Delete a label */ + delete: operations["issues/delete-label"]; + /** Update a label */ + 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}/lfs": { + /** + * Enable Git LFS for a repository + * @description Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. + */ + put: operations["repos/enable-lfs-for-repo"]; + /** + * Disable Git LFS for a repository + * @description Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. + */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/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. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** + * Sync a 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 */ + get: operations["issues/list-milestones"]; + /** Create a milestone */ + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + /** Get a milestone */ + get: operations["issues/get-milestone"]; + /** Delete a milestone */ + 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 */ + 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/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + /** Get a GitHub Pages site */ + 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). + */ + 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)." You must be an admin of the repository in order to use this operation. + */ + post: operations["repos/create-pages-site"]; + /** + * Delete a GitHub Pages site + * @description Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + /** List GitHub Pages builds */ + 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 */ + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + /** Get GitHub Pages build */ + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment + * @description Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-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. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/projects": { + /** + * 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}/pulls": { + /** + * List pull requests + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/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. + */ + 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 review comment. + */ + 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 Enables you to edit a review comment. + */ + 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/reference/pulls#review-comments). + */ + 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/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete a pull request comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + 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/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * 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. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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 pull request. By default, review comments are in ascending order by ID. + */ + get: operations["pulls/list-review-comments"]; + /** + * Create a review comment for a pull request + * @description + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** + * List commits on a pull request + * @description Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. + */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** + * List pull requests files + * @description **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. + */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + /** Check if a pull request has been merged */ + get: operations["pulls/check-if-merged"]; + /** + * Merge a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 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 */ + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** + * List reviews for a pull request + * @description The list of reviews returns in chronological order. + */ + get: operations["pulls/list-reviews"]; + /** + * Create a review for a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * 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#submit-a-review-for-a-pull-request)." + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + /** Get a review for a pull request */ + get: operations["pulls/get-review"]; + /** + * Update a review for a pull request + * @description Update the review summary comment with new text. + */ + put: operations["pulls/update-review"]; + /** Delete a pending review for a pull request */ + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** + * List comments for a pull request review + * @description List comments for a specific pull request review. + */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** + * Dismiss a review for a pull request + * @description **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. + */ + 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#create-a-review-for-a-pull-request)." + */ + 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. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Get a repository README for a directory + * @description Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 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/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/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/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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 **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). + */ + get: operations["repos/get-release"]; + /** + * 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/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** + * List reactions for a release + * @description List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + get: operations["reactions/list-for-release"]; + /** + * Create reaction for a release + * @description Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + 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/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/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. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/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. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Update a secret scanning alert + * @description Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + 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. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * List stargazers + * @description Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + 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. + */ + 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](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + 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 */ + 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/reference/activity#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/reference/activity#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 + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + /** List repository teams */ + 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 + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. 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/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * List public repositories + * @description Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** + * List environment secrets + * @description Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/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 you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** + * Get an environment secret + * @description Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + 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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** + * Delete an environment secret + * @description Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-secret"]; + }; + "/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/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Search commits + * @description Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `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/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Search labels + * @description Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + 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/overview/resources-in-the-rest-api#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Search topics + * @description Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + 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/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** + * 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/reference/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/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * 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/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * 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/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * 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/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * 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/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * 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/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * 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/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * 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/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * 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/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * 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/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * 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/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * 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/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * 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/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * 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/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * 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/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * 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/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * 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/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * 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/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * 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/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/get-member-legacy"]; + /** + * 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/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * 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/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * 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/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * 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/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * 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/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * 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/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * 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/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * 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/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * 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/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** + * 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/reference/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/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * 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/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * 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/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/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/reference/teams#list-child-teams) endpoint. + */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * Get the authenticated user + * @description If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + 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 */ + get: operations["users/check-blocked"]; + /** Block a user */ + put: operations["users/block"]; + /** Unblock a user */ + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * List codespaces for the authenticated user + * @description Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * List secrets for the authenticated user + * @description Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission 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 secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission 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 secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Delete a secret for the authenticated user + * @description Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + 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 codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + 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 codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories 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 codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + 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 codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Delete a codespace for the authenticated user + * @description Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Start a codespace for the authenticated user + * @description Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-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. This endpoint is accessible with the `user:email` scope. + */ + get: operations["users/list-emails-for-authenticated-user"]; + /** + * Add an email address for the authenticated user + * @description This endpoint is accessible with the `user` scope. + */ + post: operations["users/add-email-for-authenticated-user"]; + /** + * Delete an email address for the authenticated user + * @description This endpoint is accessible with the `user` scope. + */ + 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/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** + * Unfollow a user + * @description Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** + * List GPG keys for the authenticated user + * @description Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** + * Get a GPG key for the authenticated user + * @description View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * List app installations accessible to the user access token + * @description Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * List repositories accessible to the user access token + * @description List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * Add a repository to an app installation + * @description Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + 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. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** + * 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/reference/pulls#list-pull-requests)" endpoint. + */ + 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. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** + * Create a public SSH key for the authenticated user + * @description Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** + * Delete a public SSH key for the authenticated user + * @description Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** + * List subscriptions for the authenticated user (stubbed) + * @description Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + /** List organization memberships for the authenticated user */ + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + /** Get an organization membership for the authenticated user */ + get: operations["orgs/get-membership-for-authenticated-user"]; + /** Update an organization membership for the authenticated user */ + 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/reference/migrations#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/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** + * Unlock a user repository + * @description Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + 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. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * List packages for the authenticated user's namespace + * @description Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Delete a package for the authenticated user + * @description Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * List package versions for a package owned by the authenticated user + * @description Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for the authenticated user + * @description Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore a package version for the authenticated user + * @description Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/repos": { + /** + * 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 scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** + * 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/ssh_signing_keys": { + /** + * List SSH signing keys for the authenticated user + * @description Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + /** Check if a repository is starred by the authenticated user */ + 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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["activity/star-repo-for-authenticated-user"]; + /** Unstar a repository for the authenticated user */ + 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. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). + */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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/overview/resources-in-the-rest-api#link-header) 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. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** + * 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 when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * 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/reference/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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Get a package for a user + * @description Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restore a package for a user + * @description Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for a user + * @description Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore package version for a user + * @description Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + /** List user projects */ + 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 repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + /** 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. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. + */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Get GitHub Actions billing for a user + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + 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)." + * + * Access tokens must have the `user` scope. + */ + 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)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-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. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + 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"]; + }; + "/zen": { + /** + * Get the Zen of GitHub + * @description Get a random sentence from the Zen of GitHub + */ + get: operations["meta/get-zen"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: OneOf<[string, null]>; + email?: OneOf<[string, null]>; + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: OneOf<[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; + starred_at?: string; + }; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** @description Unique identifier of the GitHub app */ + id: number; + /** @description The slug name of the GitHub app */ + slug?: string; + node_id: string; + owner: null | components["schemas"]["simple-user"]; + /** @description The name of the GitHub app */ + name: string; + description: OneOf<[string, null]>; + /** Format: uri */ + external_url: string; + /** Format: uri */ + html_url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + 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 */ + events: (string)[]; + /** @description The number of installations associated with the GitHub app */ + installations_count?: number; + client_id?: string; + client_secret?: string; + webhook_secret?: OneOf<[string, null]>; + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: (string)[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + */ + "webhook-config-url": string; + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + "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). */ + "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. */ + id: number; + /** @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + */ + delivered_at: string; + /** @description Whether the webhook delivery is a redelivery. */ + redelivery: boolean; + /** @description Time spent delivering. */ + duration: number; + /** @description Describes the response returned after attempting the delivery. */ + status: string; + /** @description Status code received when delivery was made. */ + status_code: number; + /** @description The event that triggered the delivery. */ + event: string; + /** @description The type of activity for the event that triggered the delivery. */ + action: OneOf<[string, null]>; + /** @description The id of the GitHub App installation associated with this event. */ + installation_id: OneOf<[number, null]>; + /** @description The id of the repository associated with this event. */ + repository_id: OneOf<[number, null]>; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: OneOf<[string, null]>; + documentation_url?: OneOf<[string, null]>; + detail?: OneOf<[string, null]>; + status?: number; + scimType?: OneOf<[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?: OneOf<[string, null]> | OneOf<[number, null]> | OneOf<[(string)[], null]>; + })[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** @description Unique identifier of the delivery. */ + id: number; + /** @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + */ + delivered_at: string; + /** @description Whether the delivery is a redelivery. */ + redelivery: boolean; + /** @description Time spent delivering. */ + duration: number; + /** @description Description of the status of the attempted delivery */ + status: string; + /** @description Status code received when delivery was made. */ + status_code: number; + /** @description The event that triggered the delivery. */ + event: string; + /** @description The type of activity for the event that triggered the delivery. */ + action: OneOf<[string, null]>; + /** @description The id of the GitHub App installation associated with this event. */ + installation_id: OneOf<[number, null]>; + /** @description The id of the repository associated with this event. */ + repository_id: OneOf<[number, null]>; + /** @description The URL target of the delivery. */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: OneOf<[{ + [key: string]: unknown | undefined; + }, null]>; + /** @description The webhook payload. */ + payload: OneOf<[{ + [key: string]: unknown | undefined; + }, null]>; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: OneOf<[{ + [key: string]: unknown | undefined; + }, null]>; + /** @description The response payload received. */ + payload: OneOf<[string, null]>; + }; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: OneOf<[string, null]>; + /** @description Unique identifier of the enterprise */ + id: number; + node_id: string; + /** @description The name of the enterprise. */ + name: string; + /** @description The slug url identifier for the enterprise. */ + slug: string; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @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 view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "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 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 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"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** @description The ID of the installation. */ + id: number; + account: OneOf<[null, components["schemas"]["simple-user"] | components["schemas"]["enterprise"]]>; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** Format: uri */ + access_tokens_url: string; + /** Format: uri */ + repositories_url: string; + /** Format: uri */ + html_url: string; + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: (string)[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + single_file_name: OneOf<[string, null]>; + has_multiple_single_files?: boolean; + single_file_paths?: (string)[]; + app_slug: string; + suspended_by: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + suspended_at: OneOf<[string, null]>; + contact_email?: OneOf<[string, null]>; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + key: string; + name: string; + /** Format: uri */ + url: OneOf<[string, null]>; + spdx_id: OneOf<[string, null]>; + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** @description Unique identifier of the repository */ + id: number; + node_id: string; + /** @description The name of the repository. */ + name: string; + full_name: string; + license: null | components["schemas"]["license-simple"]; + organization?: null | components["schemas"]["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 */ + html_url: string; + description: OneOf<[string, null]>; + fork: boolean; + /** Format: uri */ + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + 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; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_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; + clone_url: string; + /** Format: uri */ + mirror_url: OneOf<[string, null]>; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + homepage: OneOf<[string, null]>; + language: OneOf<[string, null]>; + forks_count: number; + stargazers_count: number; + watchers_count: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size: number; + /** @description The default branch of the repository. */ + default_branch: string; + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + */ + is_template?: boolean; + topics?: (string)[]; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + 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 */ + pushed_at: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + template_repository?: OneOf<[{ + 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 + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default 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 + */ + 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 + */ + 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; + 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"])[]; + single_file?: string; + has_multiple_single_files?: boolean; + single_file_paths?: (string)[]; + }; + /** Scoped Installation */ + "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"; + single_file_name: OneOf<[string, null]>; + has_multiple_single_files?: boolean; + single_file_paths?: (string)[]; + /** Format: uri */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + }; + /** + * 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: OneOf<[(string)[], null]>; + token: string; + token_last_eight: OneOf<[string, null]>; + hashed_token: OneOf<[string, null]>; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: OneOf<[string, null]>; + /** Format: uri */ + note_url: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: OneOf<[string, null]>; + user?: null | components["schemas"]["simple-user"]; + installation?: null | components["schemas"]["scoped-installation"]; + /** Format: date-time */ + expires_at: OneOf<[string, null]>; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + key: string; + name: string; + /** Format: uri */ + url: string; + body?: string; + /** Format: uri */ + html_url: OneOf<[string, null]>; + }; + /** + * Server Statistics Proxy Endpoint + * @description Response of S4 Proxy endpoint that provides GHES statistics + */ + "server-statistics": ({ + server_id?: string; + collection_date?: string; + schema_version?: string; + ghes_version?: string; + host_name?: string; + github_connect?: { + features_enabled?: (string)[]; + }; + ghe_stats?: { + comments?: { + total_commit_comments?: number; + total_gist_comments?: number; + total_issue_comments?: number; + total_pull_request_comments?: number; + }; + gists?: { + total_gists?: number; + private_gists?: number; + public_gists?: number; + }; + hooks?: { + total_hooks?: number; + active_hooks?: number; + inactive_hooks?: number; + }; + issues?: { + total_issues?: number; + open_issues?: number; + closed_issues?: number; + }; + milestones?: { + total_milestones?: number; + open_milestones?: number; + closed_milestones?: number; + }; + orgs?: { + total_orgs?: number; + disabled_orgs?: number; + total_teams?: number; + total_team_members?: number; + }; + pages?: { + total_pages?: number; + }; + pulls?: { + total_pulls?: number; + merged_pulls?: number; + mergeable_pulls?: number; + unmergeable_pulls?: number; + }; + repos?: { + total_repos?: number; + root_repos?: number; + fork_repos?: number; + org_repos?: number; + total_pushes?: number; + total_wikis?: number; + }; + users?: { + total_users?: number; + admin_users?: number; + suspended_users?: number; + }; + }; + dormant_users?: { + total_dormant_users?: number; + dormancy_threshold?: string; + }; + })[]; + "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; + }; + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-organizations": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions 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-enterprise-permissions": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ + selected_organizations_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + url: 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: OneOf<[string, null]>; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions 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/*`." */ + patterns_allowed?: (string)[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + /** + * Self hosted runner label + * @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. */ + id: number; + /** @description The name of the runner. */ + name: string; + /** @description The Operating System of the runner. */ + os: string; + /** @description The status of the runner. */ + 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 */ + token: string; + /** + * Format: date-time + * @description The time this token expires + */ + expires_at: string; + permissions?: Record; + /** @description The repositories this token has access to */ + repositories?: (components["schemas"]["repository"])[]; + single_file?: OneOf<[string, null]>; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** @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": OneOf<[string, null]>; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** @description The security alert number. */ + readonly "alert-number": number; + /** + * 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: 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: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + readonly "alert-instances-url": string; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-fixed-at": OneOf<[string, null]>; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-dismissed-at": OneOf<[string, null]>; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": "" | "false positive" | "won't fix" | "used in tests" | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": OneOf<[string, null]>; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: OneOf<[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?: OneOf<[(string)[], null]>; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: OneOf<[string, null]>; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: OneOf<[string, null]>; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": OneOf<[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 full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "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"])[]; + }; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** @description A unique identifier of the repository. */ + id: number; + /** @description The GraphQL identifier of the repository. */ + node_id: string; + /** @description The name of the repository. */ + name: string; + /** @description The full, globally unique, name of the repository. */ + 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. + */ + html_url: string; + /** @description The repository description. */ + description: OneOf<[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. + */ + url: string; + /** @description A template for the API URL to download the repository as an archive. */ + archive_url: string; + /** @description A template for the API URL to list the available assignees for issues in the repository. */ + assignees_url: string; + /** @description A template for the API URL to create or retrieve a raw Git blob in the repository. */ + blobs_url: string; + /** @description A template for the API URL to get information about branches in the repository. */ + branches_url: string; + /** @description A template for the API URL to get information about collaborators of the repository. */ + collaborators_url: string; + /** @description A template for the API URL to get information about comments on the repository. */ + comments_url: string; + /** @description A template for the API URL to get information about commits on the repository. */ + commits_url: string; + /** @description A template for the API URL to compare two commits or refs. */ + compare_url: string; + /** @description A template for the API URL to get the contents of the repository. */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + */ + forks_url: string; + /** @description A template for the API URL to get information about Git commits of the repository. */ + git_commits_url: string; + /** @description A template for the API URL to get information about Git refs of the repository. */ + git_refs_url: string; + /** @description A template for the API URL to get information about Git tags of the repository. */ + git_tags_url: string; + /** @description A template for the API URL to get information about issue comments on the repository. */ + issue_comment_url: string; + /** @description A template for the API URL to get information about issue events on the repository. */ + issue_events_url: string; + /** @description A template for the API URL to get information about issues on the repository. */ + issues_url: string; + /** @description A template for the API URL to get information about deploy keys on the repository. */ + keys_url: string; + /** @description A template for the API URL to get information about labels of the repository. */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + */ + merges_url: string; + /** @description A template for the API URL to get information about milestones of the repository. */ + milestones_url: string; + /** @description A template for the API URL to get information about notifications on the repository. */ + notifications_url: string; + /** @description A template for the API URL to get information about pull requests on the repository. */ + pulls_url: string; + /** @description A template for the API URL to get information about releases on the repository. */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + */ + stargazers_url: string; + /** @description A template for the API URL to get information about statuses of a commit. */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + */ + teams_url: string; + /** @description A template for the API URL to create or retrieve a raw Git tree of the repository. */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + */ + hooks_url: string; + }; + "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: null | components["schemas"]["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"]; + repository: components["schemas"]["simple-repository"]; + }; + /** @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: OneOf<[{ + /** @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "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: null | components["schemas"]["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: OneOf<[string, null]>; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * @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?: null | components["schemas"]["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?: OneOf<[string, null]>; + resolved_by?: null | components["schemas"]["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?: OneOf<[boolean, null]>; + push_protection_bypassed_by?: null | components["schemas"]["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?: OneOf<[string, null]>; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: OneOf<[string, null]>; + }; + "advanced-security-active-committers-user": { + user_login: string; + last_pushed_date: string; + }; + "advanced-security-active-committers-repository": { + name: string; + advanced_security_committers: number; + advanced_security_committers_breakdown: (components["schemas"]["advanced-security-active-committers-user"])[]; + }; + "advanced-security-active-committers": { + total_advanced_security_committers?: number; + total_count?: number; + repositories: (components["schemas"]["advanced-security-active-committers-repository"])[]; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: OneOf<[string, null]>; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + labels_url: string; + id: number; + node_id: string; + /** @description The number of the milestone. */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + description: OneOf<[string, null]>; + creator: null | components["schemas"]["simple-user"]; + open_issues: number; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[string, null]>; + }; + /** + * author_association + * @description How the author is associated with the repository. + * @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: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + */ + 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 */ + number: number; + /** @description State of the issue; either 'open' or 'closed' */ + state: string; + /** + * @description The reason for the current state + * @enum {string|null} + */ + state_reason?: "completed" | "reopened" | "not_planned" | "" | null; + /** @description Title of the issue */ + title: string; + /** @description Contents of the issue */ + body?: OneOf<[string, null]>; + user: null | components["schemas"]["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 */ + labels: (OneOf<[string, { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: OneOf<[string, null]>; + color?: OneOf<[string, null]>; + default?: boolean; + }]>)[]; + assignee: null | components["schemas"]["simple-user"]; + assignees?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + milestone: null | components["schemas"]["milestone"]; + locked: boolean; + active_lock_reason?: OneOf<[string, null]>; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: OneOf<[string, null]>; + /** Format: uri */ + diff_url: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + patch_url: OneOf<[string, null]>; + /** Format: uri */ + url: OneOf<[string, null]>; + }; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: null | components["schemas"]["simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: null | components["schemas"]["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": { + /** @description Unique identifier of the issue comment */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** @description Contents of the issue comment */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: null | components["schemas"]["integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: OneOf<[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?: OneOf<[string, null]>; + action?: string; + sha?: string; + html_url?: string; + })[]; + }; + public: boolean; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + timeline_url: string; + user_url: string; + current_user_public_url?: string; + current_user_url?: string; + current_user_actor_url?: string; + current_user_organization_url?: string; + current_user_organization_urls?: (string)[]; + security_advisories_url?: string; + /** @description A feed of discussions for a given repository. */ + repository_discussions_url?: string; + /** @description A feed of discussions for a given repository and 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; + } | undefined; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: OneOf<[string, null]>; + comments: number; + user: null | components["schemas"]["simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: (Record)[]; + history?: (Record)[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: OneOf<[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: OneOf<[string, null]>; + company: OneOf<[string, null]>; + blog: OneOf<[string, null]>; + location: OneOf<[string, null]>; + /** Format: email */ + email: OneOf<[string, null]>; + hireable: OneOf<[boolean, null]>; + bio: OneOf<[string, null]>; + twitter_username?: OneOf<[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?: OneOf<[string, null]>; + private_gists?: number; + total_private_repos?: number; + owned_private_repos?: number; + disk_usage?: number; + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: null | components["schemas"]["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?: OneOf<[({ + 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?: OneOf<[(components["schemas"]["gist-history"])[], null]>; + /** + * Gist + * @description Gist + */ + fork_of?: OneOf<[{ + /** 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; + } | undefined; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: OneOf<[string, null]>; + comments: number; + user: null | components["schemas"]["simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: null | components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: (Record)[]; + history?: (Record)[]; + }, 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]: OneOf<[{ + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + }, null]> | undefined; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: OneOf<[string, null]>; + comments?: number; + user?: OneOf<[string, null]>; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + /** @description The comment text. */ + body: string; + user: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** Format: uri */ + url: string; + version: string; + user: null | components["schemas"]["simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: date-time */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + name: string; + source: string; + }; + /** + * License + * @description License + */ + license: { + key: string; + name: string; + spdx_id: OneOf<[string, null]>; + /** Format: uri */ + url: OneOf<[string, null]>; + node_id: string; + /** Format: uri */ + html_url: string; + description: string; + implementation: string; + permissions: (string)[]; + conditions: (string)[]; + limitations: (string)[]; + body: string; + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** Format: uri */ + url: string; + /** Format: uri */ + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: OneOf<[string, null]>; + state: string; + bullets: (string)[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: OneOf<[string, null]>; + marketplace_pending_change?: OneOf<[{ + is_installed?: boolean; + effective_date?: string; + unit_count?: OneOf<[number, null]>; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + }, null]>; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: OneOf<[string, null]>; + is_installed?: boolean; + unit_count?: OneOf<[number, null]>; + on_free_trial?: boolean; + free_trial_ends_on?: OneOf<[string, null]>; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + ssh_keys?: (string)[]; + hooks?: (string)[]; + web?: (string)[]; + api?: (string)[]; + git?: (string)[]; + packages?: (string)[]; + pages?: (string)[]; + importer?: (string)[]; + actions?: (string)[]; + dependabot?: (string)[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: OneOf<[string, null]>; + fork: boolean; + /** Format: uri */ + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + 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; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_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; + clone_url?: string; + mirror_url?: OneOf<[string, null]>; + /** Format: uri */ + hooks_url: string; + svn_url?: string; + homepage?: OneOf<[string, null]>; + language?: OneOf<[string, null]>; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: (string)[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** Format: date-time */ + pushed_at?: OneOf<[string, null]>; + /** Format: date-time */ + created_at?: OneOf<[string, null]>; + /** Format: date-time */ + updated_at?: OneOf<[string, null]>; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + 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?: OneOf<[{ + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + }, null]>; + forks?: number; + open_issues?: number; + watchers?: number; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + /** + * 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: OneOf<[string, null]>; + url: string; + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + subscribed: boolean; + ignored: boolean; + reason: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: uri */ + url: string; + /** Format: uri */ + thread_url?: string; + /** Format: uri */ + repository_url?: string; + }; + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + "organization-custom-repository-role": { + /** @description The unique identifier of the custom role. */ + id: number; + /** @description The name of the custom role. */ + name: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: OneOf<[string, null]>; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions?: (string)[]; + organization?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + url: 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: OneOf<[string, null]>; + name?: string; + company?: string; + /** Format: uri */ + blog?: string; + location?: string; + /** Format: email */ + email?: string; + twitter_username?: OneOf<[string, null]>; + is_verified?: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: uri */ + html_url: string; + /** Format: date-time */ + created_at: string; + type: string; + total_private_repos?: number; + owned_private_repos?: number; + private_gists?: OneOf<[number, null]>; + disk_usage?: OneOf<[number, null]>; + collaborators?: OneOf<[number, null]>; + /** Format: email */ + billing_email?: OneOf<[string, null]>; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: OneOf<[string, null]>; + members_can_create_repositories?: OneOf<[boolean, null]>; + two_factor_requirement_enabled?: OneOf<[boolean, null]>; + members_allowed_repository_creation_type?: string; + members_can_create_public_repositories?: boolean; + members_can_create_private_repositories?: boolean; + members_can_create_internal_repositories?: boolean; + members_can_create_pages?: boolean; + members_can_create_public_pages?: boolean; + members_can_create_private_pages?: boolean; + members_can_fork_private_repositories?: OneOf<[boolean, null]>; + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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 An optional URL string to display to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: OneOf<[string, null]>; + }; + /** + * 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. */ + full_name: string; + /** @description The sum of the size in bytes of all the active cache items in the repository. */ + active_caches_size_in_bytes: number; + /** @description The number of active caches in the repository. */ + active_caches_count: number; + }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + "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"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** @description The name of the secret. */ + 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 */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** @description The identifier for the key. */ + key_id: string; + /** @description The Base64 encoded public key. */ + key: string; + id?: number; + url?: string; + title?: string; + created_at?: string; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": Record; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** @description The name of the machine. */ + name: string; + /** @description The display name of the machine includes cores, memory, and storage. */ + display_name: string; + /** @description The operating system of the machine. */ + operating_system: string; + /** @description How much storage is available to the codespace. */ + storage_in_bytes: number; + /** @description How much memory is available to the codespace. */ + memory_in_bytes: number; + /** @description How many cores are available to the codespace. */ + 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. + * @enum {string|null} + */ + prebuild_availability: "none" | "ready" | "in_progress" | "" | null; + }; + /** + * Codespace + * @description A codespace. + */ + codespace: { + id: number; + /** @description Automatically generated name of this codespace. */ + name: string; + /** @description Display name for this codespace. */ + display_name?: OneOf<[string, null]>; + /** @description UUID identifying this codespace's environment. */ + environment_id: OneOf<[string, null]>; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: null | components["schemas"]["codespace-machine"]; + /** @description Path to devcontainer.json from repo root used to create Codespace. */ + devcontainer_path?: OneOf<[string, null]>; + /** @description Whether the codespace was created from a prebuild. */ + prebuild: OneOf<[boolean, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + */ + last_used_at: string; + /** + * @description State of this codespace. + * @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. */ + ahead?: number; + /** @description The number of commits the local repository is behind the remote. */ + 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. */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** @description The number of minutes of inactivity after which this codespace will be automatically stopped. */ + idle_timeout_minutes: OneOf<[number, null]>; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: OneOf<[string, null]>; + recent_folders: (string)[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: OneOf<[(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?: OneOf<[boolean, null]>; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: OneOf<[string, null]>; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: OneOf<[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). */ + retention_period_minutes?: OneOf<[number, null]>; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + */ + retention_expires_at?: OneOf<[string, null]>; + /** @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. */ + last_known_stop_notice?: OneOf<[string, null]>; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** @description The name of the secret */ + 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 + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** @description The identifier for the key. */ + key_id: string; + /** @description The Base64 encoded public key. */ + key: string; + id?: number; + url?: string; + title?: string; + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** @description The name of the secret. */ + 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 */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** @description The identifier for the key. */ + key_id: string; + /** @description The Base64 encoded public key. */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: OneOf<[string, null]>; + email: OneOf<[string, null]>; + role: string; + created_at: string; + failed_at?: OneOf<[string, null]>; + failed_reason?: OneOf<[string, null]>; + inviter: components["schemas"]["simple-user"]; + team_count: number; + node_id: string; + invitation_teams_url: string; + }; + /** + * Organization Fine-Grained Permission + * @description Fine-grained permissions available for the organization + */ + "organization-fine-grained-permission": { + name: string; + description: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + id: number; + /** Format: uri */ + url: string; + /** Format: uri */ + ping_url: string; + /** Format: uri */ + deliveries_url?: string; + name: string; + events: (string)[]; + active: boolean; + config: { + url?: string; + insecure_ssl?: string; + content_type?: string; + secret?: string; + }; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + 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. + * @enum {string} + */ + "interaction-group": "existing_users" | "contributors_only" | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + origin: string; + /** Format: date-time */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @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"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** @description Unique identifier of the team */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + members_url: string; + /** @description Name of the team */ + name: string; + /** @description Description of the team */ + description: OneOf<[string, null]>; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @description The level of privacy this team should have */ + privacy?: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + repositories_url: string; + slug: string; + /** @description Distinguished Name (DN) that team maps to within LDAP environment */ + ldap_dn?: string; + }; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: OneOf<[string, null]>; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: null | components["schemas"]["team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** Format: uri */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** Format: uri */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: null | components["schemas"]["simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + id: number; + owner: null | components["schemas"]["simple-user"]; + guid: string; + state: string; + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: (components["schemas"]["repository"])[]; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: (Record)[]; + }; + /** + * Package + * @description A software package + */ + package: { + /** @description Unique identifier of the package. */ + id: number; + /** @description The name of the package. */ + name: string; + /** @enum {string} */ + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + url: string; + html_url: string; + /** @description The number of versions of the package. */ + version_count: number; + /** @enum {string} */ + visibility: "private" | "public"; + owner?: null | components["schemas"]["simple-user"]; + repository?: null | components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** @description Unique identifier of the package version. */ + id: number; + /** @description The name of the package version. */ + name: string; + url: string; + package_html_url: string; + html_url?: string; + license?: string; + description?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** @enum {string} */ + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + /** Container Metadata */ + container?: { + tags: (string)[]; + }; + /** Docker Metadata */ + docker?: { + tag?: (string)[]; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** Format: uri */ + owner_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + columns_url: string; + id: number; + node_id: string; + /** @description Name of the project */ + name: string; + /** @description Body of the project */ + body: OneOf<[string, null]>; + number: number; + /** @description State of the project; either 'open' or 'closed' */ + state: string; + creator: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + "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 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": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + url: 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: OneOf<[string, null]>; + name?: string; + company?: string; + /** Format: uri */ + blog?: string; + location?: string; + /** Format: email */ + email?: string; + twitter_username?: OneOf<[string, null]>; + is_verified?: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: uri */ + html_url: string; + /** Format: date-time */ + created_at: string; + type: string; + total_private_repos?: number; + owned_private_repos?: number; + private_gists?: OneOf<[number, null]>; + disk_usage?: OneOf<[number, null]>; + collaborators?: OneOf<[number, null]>; + /** Format: email */ + billing_email?: OneOf<[string, null]>; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: OneOf<[string, null]>; + members_can_create_repositories?: OneOf<[boolean, null]>; + two_factor_requirement_enabled?: OneOf<[boolean, null]>; + members_allowed_repository_creation_type?: string; + members_can_create_public_repositories?: boolean; + members_can_create_private_repositories?: boolean; + members_can_create_internal_repositories?: boolean; + members_can_create_pages?: boolean; + members_can_create_public_pages?: boolean; + members_can_create_private_pages?: boolean; + members_can_fork_private_repositories?: OneOf<[boolean, null]>; + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** @description Unique identifier of the team */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + /** Format: uri */ + html_url: string; + /** @description Name of the team */ + name: string; + slug: string; + description: OneOf<[string, null]>; + /** + * @description The level of privacy this team should have + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** @description Permission that the team will have for its repositories */ + permission: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent?: null | components["schemas"]["team-simple"]; + members_count: number; + repos_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** @description Distinguished Name (DN) that team maps to within LDAP environment */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: null | components["schemas"]["simple-user"]; + /** @description The main text of the discussion. */ + body: string; + 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. */ + body_version: string; + comments_count: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + last_edited_at: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + node_id: string; + /** @description The unique sequence number of a team discussion. */ + number: number; + /** @description Whether or not this discussion should be pinned for easy retrieval. */ + pinned: boolean; + /** @description Whether or not this discussion should be restricted to team members and organization administrators. */ + private: boolean; + /** Format: uri */ + team_url: string; + /** @description The title of the discussion. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: null | components["schemas"]["simple-user"]; + /** @description The main text of the comment. */ + body: string; + 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. */ + body_version: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + last_edited_at: OneOf<[string, null]>; + /** Format: uri */ + discussion_url: string; + /** Format: uri */ + html_url: string; + node_id: string; + /** @description The unique sequence number of a team discussion comment. */ + number: number; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + 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: { + id: number; + node_id: string; + user: null | components["schemas"]["simple-user"]; + /** + * @description The reaction to use + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + /** Format: date-time */ + 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 + * @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: OneOf<[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 */ + id: number; + node_id: string; + /** @description The name of the repository. */ + name: string; + full_name: string; + license: null | components["schemas"]["license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + role_name?: string; + owner: null | components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** Format: uri */ + html_url: string; + description: OneOf<[string, null]>; + fork: boolean; + /** Format: uri */ + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + 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; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_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; + clone_url: string; + /** Format: uri */ + mirror_url: OneOf<[string, null]>; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + homepage: OneOf<[string, null]>; + language: OneOf<[string, null]>; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + /** @description The default branch of the repository. */ + default_branch: string; + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + */ + is_template?: boolean; + topics?: (string)[]; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default 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 */ + pushed_at: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + template_repository?: null | components["schemas"]["repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + */ + 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; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** Format: uri */ + url: string; + /** @description The project card's ID */ + id: number; + node_id: string; + note: OneOf<[string, null]>; + creator: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @description Whether or not the card is archived */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: uri */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** Format: uri */ + url: string; + /** Format: uri */ + project_url: string; + /** Format: uri */ + cards_url: string; + /** @description The unique identifier of the project column */ + id: number; + node_id: string; + /** @description Name of the project column */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: null | components["schemas"]["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"]; + 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"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** Format: uri */ + url: string; + key: string; + name: string; + /** Format: uri */ + html_url: OneOf<[string, null]>; + }; + "security-and-analysis": OneOf<[{ + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + }, null]>; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: OneOf<[string, null]>; + fork: boolean; + /** Format: uri */ + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + 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; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_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; + clone_url: string; + /** Format: uri */ + mirror_url: OneOf<[string, null]>; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + homepage: OneOf<[string, null]>; + language: OneOf<[string, null]>; + forks_count: number; + stargazers_count: number; + watchers_count: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size: number; + default_branch: string; + open_issues_count: number; + is_template?: boolean; + topics?: (string)[]; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + 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; + /** Format: date-time */ + pushed_at: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + allow_rebase_merge?: boolean; + template_repository?: null | components["schemas"]["repository"]; + temp_clone_token?: OneOf<[string, null]>; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_merge_commit?: 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_forking?: boolean; + web_commit_signoff_required?: boolean; + subscribers_count: number; + network_count: number; + license: null | components["schemas"]["license-simple"]; + organization?: null | components["schemas"]["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"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + id: number; + node_id: string; + /** @description The name of the artifact. */ + name: string; + /** @description The size in bytes of the artifact. */ + size_in_bytes: number; + url: string; + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: date-time */ + expires_at: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + workflow_run?: OneOf<[{ + id?: number; + repository_id?: number; + head_repository_id?: number; + head_branch?: string; + head_sha?: string; + }, null]>; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** @description Total number of caches */ + total_count: number; + /** @description Array of caches */ + actions_caches: ({ + id?: number; + ref?: string; + key?: string; + version?: string; + /** Format: date-time */ + last_accessed_at?: string; + /** Format: date-time */ + created_at?: string; + size_in_bytes?: number; + })[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** @description The id of the job. */ + id: number; + /** @description The id of the associated workflow run. */ + run_id: number; + run_url: string; + /** @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. */ + run_attempt?: number; + node_id: string; + /** @description The SHA of the commit that is being run. */ + head_sha: string; + url: string; + html_url: OneOf<[string, null]>; + /** + * @description The phase of the lifecycle that the job is currently in. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @enum {string|null} + */ + conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "" | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + */ + completed_at: OneOf<[string, null]>; + /** @description The name of the job. */ + name: string; + /** @description Steps in this job. */ + steps?: ({ + /** + * @description The phase of the lifecycle that the job is currently in. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The outcome of the job. */ + conclusion: OneOf<[string, null]>; + /** @description The name of the job. */ + name: string; + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + */ + started_at?: OneOf<[string, null]>; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + */ + completed_at?: OneOf<[string, null]>; + })[]; + check_run_url: string; + /** @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. */ + 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.) */ + runner_id: OneOf<[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.) */ + runner_name: OneOf<[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.) */ + runner_group_id: OneOf<[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.) */ + runner_group_name: OneOf<[string, null]>; + }; + /** @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 access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: "none" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + 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. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: OneOf<[{ + name: string; + email: string; + }, null]>; + committer: OneOf<[{ + name: string; + email: string; + }, null]>; + }; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** @description The ID of the workflow run. */ + id: number; + /** @description The name of the workflow run. */ + name?: OneOf<[string, null]>; + node_id: string; + /** @description The ID of the associated check suite. */ + check_suite_id?: number; + /** @description The node ID of the associated check suite. */ + check_suite_node_id?: string; + head_branch: OneOf<[string, null]>; + /** @description The SHA of the head commit that points to the version of the workflow being run. */ + head_sha: string; + /** @description The full path of the workflow */ + path: string; + /** @description The auto incrementing run number for the workflow run. */ + run_number: number; + /** @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. */ + run_attempt?: number; + referenced_workflows?: OneOf<[(components["schemas"]["referenced-workflow"])[], null]>; + event: string; + status: OneOf<[string, null]>; + conclusion: OneOf<[string, null]>; + /** @description The ID of the parent workflow. */ + workflow_id: number; + /** @description The URL to the workflow run. */ + url: string; + html_url: string; + pull_requests: OneOf<[(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. */ + jobs_url: string; + /** @description The URL to download the logs for the workflow run. */ + logs_url: string; + /** @description The URL to the associated check suite. */ + check_suite_url: string; + /** @description The URL to the artifacts for the workflow run. */ + artifacts_url: string; + /** @description The URL to cancel the workflow run. */ + cancel_url: string; + /** @description The URL to rerun the workflow run. */ + rerun_url: string; + /** @description The URL to the previous attempted run of this workflow, if one exists. */ + previous_attempt_url?: OneOf<[string, null]>; + /** @description The URL to the workflow. */ + workflow_url: string; + head_commit: null | components["schemas"]["simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + 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. */ + 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. */ + id?: number; + node_id?: string; + /** @description The name of the environment. */ + name?: string; + url?: string; + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + */ + updated_at?: string; + })[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** @description The comment submitted with the deployment review */ + comment: string; + }; + /** + * @description The type of reviewer. + * @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. */ + id?: number; + node_id?: string; + /** @description The name of the environment. */ + name?: string; + url?: string; + html_url?: string; + }; + /** @description The set duration of the wait timer */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + */ + wait_timer_started_at: OneOf<[string, null]>; + /** @description Whether the currently authenticated user can approve the deployment */ + 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 */ + url: string; + /** @description Unique identifier of the deployment */ + id: number; + node_id: string; + sha: string; + /** @description The ref to deploy. This can be a branch, tag, or sha. */ + ref: string; + /** @description Parameter to specify a task to execute */ + task: string; + payload: OneOf<[{ + [key: string]: unknown | undefined; + }, string]>; + original_environment?: string; + /** @description Name for the target deployment environment. */ + environment: string; + description: OneOf<[string, null]>; + creator: null | components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + statuses_url: string; + /** Format: uri */ + repository_url: string; + /** @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: false. */ + production_environment?: boolean; + performed_via_github_app?: null | components["schemas"]["integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: ({ + job_id: number; + duration_ms: number; + })[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: ({ + job_id: number; + duration_ms: number; + })[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: ({ + job_id: number; + duration_ms: number; + })[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** @description The name of the secret. */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + id: number; + node_id: string; + name: string; + path: string; + /** @enum {string} */ + state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually"; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + url: string; + html_url: string; + badge_url: string; + /** Format: date-time */ + deleted_at?: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + id: number; + /** @description The prefix of a key that is linkified. */ + key_prefix: string; + /** @description A template for the target URL that is generated if a key was found. */ + url_template: string; + /** @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. */ + is_alphanumeric: 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: OneOf<[number, null]>; + })[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** Format: uri */ + url: string; + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** Format: uri */ + 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"])[]; + url?: string; + users_url?: string; + 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"])[]; + }; + dismiss_stale_reviews: boolean; + require_code_owner_reviews: boolean; + required_approving_review_count?: number; + /** + * @description Whether someone other than the person who last pushed to the branch must approve this pull request. + * @default false + */ + 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?: OneOf<[string, null]>; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: OneOf<[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; + gravatar_id?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + received_events_url?: string; + type?: string; + 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; + }; + name?: string; + protection_url?: string; + required_signatures?: { + /** Format: uri */ + url: string; + 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. + */ + "git-user": { + name?: string; + email?: string; + date?: string; + }; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: OneOf<[string, null]>; + signature: OneOf<[string, null]>; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + sha: string; + filename: string; + /** @enum {string} */ + status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; + additions: number; + deletions: number; + changes: number; + /** Format: uri */ + blob_url: string; + /** Format: uri */ + raw_url: string; + /** Format: uri */ + contents_url: string; + patch?: string; + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** Format: uri */ + url: string; + sha: string; + node_id: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + /** Format: uri */ + url: string; + author: null | components["schemas"]["git-user"]; + committer: null | components["schemas"]["git-user"]; + message: string; + comment_count: number; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: null | components["schemas"]["simple-user"]; + committer: null | components["schemas"]["simple-user"]; + parents: ({ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + 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; + pattern?: string; + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** Format: uri */ + url: string; + strict: boolean; + contexts: (string)[]; + checks: ({ + context: string; + app_id: OneOf<[number, null]>; + })[]; + /** Format: uri */ + 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 someone other than the person who last pushed to the branch must approve this pull request. + * @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 */ + url: string; + 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 */ + url: string; + /** @description Unique identifier of the deployment */ + id: number; + node_id: string; + /** @description Parameter to specify a task to execute */ + task: string; + original_environment?: string; + /** @description Name for the target deployment environment. */ + environment: string; + description: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + statuses_url: string; + /** Format: uri */ + repository_url: string; + /** @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: false. */ + production_environment?: boolean; + performed_via_github_app?: null | components["schemas"]["integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** @description The id of the check. */ + id: number; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + node_id: string; + external_id: OneOf<[string, null]>; + url: string; + html_url: OneOf<[string, null]>; + details_url: OneOf<[string, null]>; + /** + * @description The phase of the lifecycle that the check is currently in. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @enum {string|null} */ + conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "" | null; + /** Format: date-time */ + started_at: OneOf<[string, null]>; + /** Format: date-time */ + completed_at: OneOf<[string, null]>; + output: { + title: OneOf<[string, null]>; + summary: OneOf<[string, null]>; + text: OneOf<[string, null]>; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** @description The name of the check. */ + name: string; + check_suite: OneOf<[{ + id: number; + }, null]>; + app: null | components["schemas"]["integration"]; + pull_requests: (components["schemas"]["pull-request-minimal"])[]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + path: string; + start_line: number; + end_line: number; + start_column: OneOf<[number, null]>; + end_column: OneOf<[number, null]>; + annotation_level: OneOf<[string, null]>; + title: OneOf<[string, null]>; + message: OneOf<[string, null]>; + raw_details: OneOf<[string, null]>; + blob_href: string; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + id: number; + node_id: string; + head_branch: OneOf<[string, null]>; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + /** @enum {string|null} */ + status: "queued" | "in_progress" | "completed" | "" | null; + /** @enum {string|null} */ + conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "startup_failure" | "stale" | "" | null; + url: OneOf<[string, null]>; + before: OneOf<[string, null]>; + after: OneOf<[string, null]>; + pull_requests: OneOf<[(components["schemas"]["pull-request-minimal"])[], null]>; + app: null | components["schemas"]["integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[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-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: OneOf<[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?: OneOf<[(string)[], null]>; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: "none" | "note" | "warning" | "error" | "" | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "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: null | components["schemas"]["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": { + 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: null | components["schemas"]["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. */ + "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"]; + 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 */ + 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: OneOf<[string, null]>; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: OneOf<[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 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?: OneOf<[string, null]>; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: OneOf<[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. */ + line: number; + /** @description The column number where this errors occurs. */ + column: number; + /** @description The contents of the line where the error occurs. */ + source?: string; + /** @description The type of error. */ + kind: string; + /** @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. */ + suggestion?: OneOf<[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). */ + message: string; + /** @description The path of the file where the error occured. */ + path: string; + })[]; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** @description The name of the secret. */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + login: string; + id: number; + email?: OneOf<[string, null]>; + name?: OneOf<[string, null]>; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: OneOf<[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; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** @description Unique identifier of the repository invitation. */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: null | components["schemas"]["simple-user"]; + inviter: null | components["schemas"]["simple-user"]; + /** + * @description The permission associated with the invitation. + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** Format: date-time */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** @description URL for the repository invitation */ + url: string; + html_url: string; + node_id: string; + }; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + role_name: string; + user: null | components["schemas"]["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: OneOf<[string, null]>; + position: OneOf<[number, null]>; + line: OneOf<[number, null]>; + commit_id: string; + user: null | components["schemas"]["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": OneOf<[{ + 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 */ + url: string; + id: number; + node_id: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + diff_url: string; + /** Format: uri */ + patch_url: string; + /** Format: uri */ + issue_url: string; + /** Format: uri */ + commits_url: string; + /** Format: uri */ + review_comments_url: string; + review_comment_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: null | components["schemas"]["simple-user"]; + body: OneOf<[string, null]>; + labels: ({ + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + })[]; + milestone: null | components["schemas"]["milestone"]; + active_lock_reason?: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + merge_commit_sha: OneOf<[string, null]>; + assignee: null | components["schemas"]["simple-user"]; + assignees?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + requested_reviewers?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + requested_teams?: OneOf<[(components["schemas"]["team"])[], null]>; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: null | components["schemas"]["simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: null | components["schemas"]["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. */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: OneOf<[string, null]>; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: OneOf<[string, null]>; + required?: OneOf<[boolean, null]>; + /** Format: uri */ + avatar_url: OneOf<[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: OneOf<[string, null]>; + id: number; + node_id: string; + state: string; + description: OneOf<[string, null]>; + target_url: OneOf<[string, null]>; + context: string; + created_at: string; + updated_at: string; + creator: null | components["schemas"]["simple-user"]; + }; + /** Community Health File */ + "community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + health_percentage: number; + description: OneOf<[string, null]>; + documentation: OneOf<[string, null]>; + files: { + code_of_conduct: null | components["schemas"]["code-of-conduct-simple"]; + code_of_conduct_file: null | components["schemas"]["community-health-file"]; + license: null | components["schemas"]["license-simple"]; + contributing: null | components["schemas"]["community-health-file"]; + readme: null | components["schemas"]["community-health-file"]; + issue_template: null | components["schemas"]["community-health-file"]; + pull_request_template: null | components["schemas"]["community-health-file"]; + }; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + permalink_url: string; + /** Format: uri */ + diff_url: string; + /** Format: uri */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** @enum {string} */ + status: "diverged" | "ahead" | "behind" | "identical"; + ahead_by: number; + behind_by: number; + 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: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + entries?: ({ + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[string, null]>; + /** Format: uri */ + self: string; + }; + })[]; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[string, null]>; + /** Format: uri */ + self: string; + }; + target?: string; + 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: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[string, null]>; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: OneOf<[{ + 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?: OneOf<[string, null]>; + payload?: OneOf<[string, null]>; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: OneOf<[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: "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: null | components["schemas"]["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: OneOf<[string, null]>; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** @description The name of the secret. */ + 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"; + manifest: string; + ecosystem: string; + name: string; + version: string; + package_url: OneOf<[string, null]>; + license: OneOf<[string, null]>; + source_repository_url: OneOf<[string, null]>; + vulnerabilities: ({ + severity: string; + advisory_ghsa_id: string; + advisory_summary: string; + 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"; + })[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: OneOf<[null, string, number, boolean]> | undefined; + }; + dependency: { + /** @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. */ + 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. + * @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. + * @enum {string} + */ + scope?: "runtime" | "development"; + /** @description Array of package-url (PURLs) of direct child dependencies. */ + dependencies?: (string)[]; + }; + manifest: { + /** @description The name of the manifest. */ + name: string; + file?: { + /** @description The path of the manifest file relative to the root of the Git repository. */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { + [key: string]: components["schemas"]["dependency"] | undefined; + }; + }; + /** + * 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. */ + 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. */ + correlator: string; + /** @description The url for the job. */ + html_url?: string; + }; + /** @description The commit SHA associated with this dependency snapshot. */ + sha: string; + /** @description The repository branch that triggered this snapshot. */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** @description The name of the detector used. */ + name: string; + /** @description The version of the detector used. */ + version: string; + /** @description The url of the detector used. */ + 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"] | undefined; + }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** Format: uri */ + url: string; + id: number; + node_id: string; + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "inactive" | "pending" | "success" | "queued" | "in_progress"; + creator: null | components["schemas"]["simple-user"]; + /** + * @description A short description of the status. + * @default + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + */ + target_url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + deployment_url: string; + /** Format: uri */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + */ + log_url?: string; + performed_via_github_app?: null | components["schemas"]["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). */ + "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": OneOf<[{ + /** @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. */ + id: number; + node_id: string; + /** @description The name of the environment. */ + name: string; + url: string; + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + */ + updated_at: string; + protection_rules?: ({ + id: number; + node_id: string; + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + } | ({ + id: number; + node_id: string; + 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"]; + })[]; + }) | { + id: number; + node_id: string; + type: string; + })[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** @description The unique identifier of the branch policy. */ + id?: number; + node_id?: string; + /** @description The name pattern that branches must match in order to deploy to the environment. */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + */ + name: string; + }; + /** + * 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: OneOf<[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 */ + 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 + */ + date: string; + /** @description Git email address of the user */ + email: string; + /** @description Name of the git user */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + */ + date: string; + /** @description Git email address of the user */ + email: string; + /** @description Name of the git user */ + name: string; + }; + /** @description Message describing the purpose of the commit */ + message: string; + tree: { + /** @description SHA for the commit */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: ({ + /** @description SHA for the commit */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + })[]; + verification: { + verified: boolean; + reason: string; + signature: OneOf<[string, null]>; + payload: OneOf<[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 */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + node_id: string; + /** @description Name of the tag */ + tag: string; + sha: string; + /** + * Format: uri + * @description URL for the tag + */ + url: string; + /** @description Message describing the purpose of the tag */ + 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 */ + tree: ({ + path?: string; + mode?: string; + type?: string; + sha?: string; + size?: number; + url?: string; + })[]; + }; + /** Hook Response */ + "hook-response": { + code: OneOf<[number, null]>; + status: OneOf<[string, null]>; + message: OneOf<[string, null]>; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** @description Unique identifier of the webhook. */ + id: number; + /** @description The name of a valid service, use 'web' for a webhook. */ + name: string; + /** @description Determines whether the hook is actually triggered on pushes. */ + active: boolean; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: (string)[]; + config: { + email?: string; + password?: string; + room?: string; + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + token?: string; + }; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + url: string; + /** Format: uri */ + test_url: string; + /** Format: uri */ + ping_url: string; + /** Format: uri */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: OneOf<[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?: OneOf<[string, null]>; + failed_step?: OneOf<[string, null]>; + error_message?: OneOf<[string, null]>; + import_percent?: OneOf<[number, null]>; + commit_count?: OneOf<[number, null]>; + push_percent?: OneOf<[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?: OneOf<[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 Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: OneOf<[string, null]>; + color: OneOf<[string, null]>; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: OneOf<[string, null]>; + dismissal_commit_id?: OneOf<[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": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + actor: null | components["schemas"]["simple-user"]; + event: string; + commit_id: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + issue?: null | components["schemas"]["issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: null | components["schemas"]["simple-user"]; + assigner?: null | components["schemas"]["simple-user"]; + review_requester?: null | components["schemas"]["simple-user"]; + requested_reviewer?: null | components["schemas"]["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?: OneOf<[string, null]>; + performed_via_github_app?: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: OneOf<[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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["integration"]; + lock_reason: OneOf<[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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | 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; + }; + }; + /** + * 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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | 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; + }; + }; + /** + * 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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | 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; + }; + }; + /** + * 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: OneOf<[string, null]>; + commit_url: OneOf<[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 */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + /** @description The name of the label. */ + name: string; + description: OneOf<[string, null]>; + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + 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 */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** @description Contents of the issue comment */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: null | components["schemas"]["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 */ + 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 + */ + date: string; + /** @description Git email address of the user */ + email: string; + /** @description Name of the git user */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + */ + date: string; + /** @description Git email address of the user */ + email: string; + /** @description Name of the git user */ + name: string; + }; + /** @description Message describing the purpose of the commit */ + message: string; + tree: { + /** @description SHA for the commit */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: ({ + /** @description SHA for the commit */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + })[]; + verification: { + verified: boolean; + reason: string; + signature: OneOf<[string, null]>; + payload: OneOf<[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 */ + id: number; + node_id: string; + user: components["schemas"]["simple-user"]; + /** @description The text of the review. */ + body: OneOf<[string, null]>; + state: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + 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. */ + 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 */ + url: string; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[number, null]>; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** @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. This field is deprecated; use `line` instead. */ + 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. */ + original_position: number; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** @description The text of the comment. */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** Format: uri */ + href: string; + }; + html: { + /** Format: uri */ + href: string; + }; + pull_request: { + /** Format: uri */ + href: string; + }; + }; + /** @description The first line of the range for a multi-line comment. */ + start_line?: OneOf<[number, null]>; + /** @description The first line of the range for a multi-line comment. */ + original_start_line?: OneOf<[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 */ + line?: number; + /** @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 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"; + reactions?: components["schemas"]["reaction-rollup"]; + body_html?: string; + 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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["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: OneOf<[string, null]>; + commit_url: OneOf<[string, null]>; + created_at: string; + performed_via_github_app: null | components["schemas"]["integration"]; + state_reason?: OneOf<[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?: OneOf<[string, null]>; + last_used?: OneOf<[string, null]>; + }; + /** + * Language + * @description Language + */ + language: { + [key: string]: number | undefined; + }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + git_url: OneOf<[string, null]>; + /** Format: uri */ + download_url: OneOf<[string, null]>; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: OneOf<[string, null]>; + /** Format: uri */ + html: OneOf<[string, null]>; + /** Format: uri */ + self: string; + }; + license: null | components["schemas"]["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; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** @enum {string} */ + state: "new" | "authorization_created" | "authorization_pending" | "authorized" | "authorization_revoked" | "issued" | "uploaded" | "approved" | "errored" | "bad_authz" | "destroy_pending" | "dns_changed"; + description: string; + /** @description Array of the domain set and its alternate name (if it is configured) */ + 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. + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @enum {string|null} + */ + status: "built" | "building" | "errored" | "" | null; + /** @description The Pages site's custom domain */ + cname: OneOf<[string, null]>; + /** + * @description The state if the domain is verified + * @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?: OneOf<[string, null]>; + /** + * @description Whether the Page has a custom 404 page. + * @default false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @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. */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** @description Whether https is enabled on the domain */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: OneOf<[string, null]>; + }; + pusher: null | components["schemas"]["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 */ + url: string; + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: OneOf<[boolean, null]>; + is_cloudflare_ip?: OneOf<[boolean, null]>; + is_fastly_ip?: OneOf<[boolean, null]>; + is_old_ip_address?: OneOf<[boolean, null]>; + is_a_record?: OneOf<[boolean, null]>; + has_cname_record?: OneOf<[boolean, null]>; + has_mx_records_present?: OneOf<[boolean, null]>; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: OneOf<[boolean, null]>; + is_cname_to_github_user_domain?: OneOf<[boolean, null]>; + is_cname_to_pages_dot_github_dot_com?: OneOf<[boolean, null]>; + is_cname_to_fastly?: OneOf<[boolean, null]>; + is_pointed_to_github_pages_ip?: OneOf<[boolean, null]>; + is_non_github_pages_ip_present?: OneOf<[boolean, null]>; + is_pages_domain?: boolean; + is_served_by_pages?: OneOf<[boolean, null]>; + is_valid?: boolean; + reason?: OneOf<[string, null]>; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: OneOf<[string, null]>; + is_https_eligible?: OneOf<[boolean, null]>; + caa_error?: OneOf<[string, null]>; + }; + alt_domain?: OneOf<[{ + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: OneOf<[boolean, null]>; + is_cloudflare_ip?: OneOf<[boolean, null]>; + is_fastly_ip?: OneOf<[boolean, null]>; + is_old_ip_address?: OneOf<[boolean, null]>; + is_a_record?: OneOf<[boolean, null]>; + has_cname_record?: OneOf<[boolean, null]>; + has_mx_records_present?: OneOf<[boolean, null]>; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: OneOf<[boolean, null]>; + is_cname_to_github_user_domain?: OneOf<[boolean, null]>; + is_cname_to_pages_dot_github_dot_com?: OneOf<[boolean, null]>; + is_cname_to_fastly?: OneOf<[boolean, null]>; + is_pointed_to_github_pages_ip?: OneOf<[boolean, null]>; + is_non_github_pages_ip_present?: OneOf<[boolean, null]>; + is_pages_domain?: boolean; + is_served_by_pages?: OneOf<[boolean, null]>; + is_valid?: boolean; + reason?: OneOf<[string, null]>; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: OneOf<[string, null]>; + is_https_eligible?: OneOf<[boolean, null]>; + caa_error?: OneOf<[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 */ + url: string; + id: number; + node_id: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + diff_url: string; + /** Format: uri */ + patch_url: string; + /** Format: uri */ + issue_url: string; + /** Format: uri */ + commits_url: string; + /** Format: uri */ + review_comments_url: string; + review_comment_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + statuses_url: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + locked: boolean; + /** @description The title of the pull request. */ + title: string; + user: null | components["schemas"]["simple-user"]; + body: OneOf<[string, null]>; + labels: ({ + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: OneOf<[string, null]>; + color: string; + default: boolean; + })[]; + milestone: null | components["schemas"]["milestone"]; + active_lock_reason?: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + merge_commit_sha: OneOf<[string, null]>; + assignee: null | components["schemas"]["simple-user"]; + assignees?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + requested_reviewers?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + requested_teams?: OneOf<[(components["schemas"]["team-simple"])[], null]>; + head: { + label: string; + ref: string; + repo: OneOf<[{ + 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + language: OneOf<[string, null]>; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + key: string; + name: string; + /** Format: uri */ + url: OneOf<[string, null]>; + spdx_id: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + language: OneOf<[string, null]>; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: OneOf<[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: null | components["schemas"]["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: OneOf<[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. */ + draft?: boolean; + merged: boolean; + mergeable: OneOf<[boolean, null]>; + rebaseable?: OneOf<[boolean, null]>; + mergeable_state: string; + merged_by: null | components["schemas"]["simple-user"]; + comments: number; + review_comments: number; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + 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 */ + id: number; + node_id: string; + user: null | components["schemas"]["simple-user"]; + /** @description The text of the review. */ + body: string; + state: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + 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. */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** Format: uri */ + url: string; + pull_request_review_id: OneOf<[number, null]>; + id: number; + node_id: string; + diff_hunk: string; + path: string; + position: OneOf<[number, null]>; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id?: number; + user: null | components["schemas"]["simple-user"]; + body: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + 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 */ + 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 */ + original_line?: number; + /** @description The first line of the range for a multi-line comment. */ + start_line?: OneOf<[number, null]>; + /** @description The original first line of the range for a multi-line comment. */ + original_start_line?: OneOf<[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. */ + name: string; + label: OneOf<[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: null | components["schemas"]["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: OneOf<[string, null]>; + /** Format: uri */ + zipball_url: OneOf<[string, null]>; + id: number; + node_id: string; + /** @description The name of the tag. */ + tag_name: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + name: OneOf<[string, null]>; + body?: OneOf<[string, null]>; + /** @description true to create a draft (unpublished) release, false to create a published one. */ + draft: boolean; + /** @description Whether to identify the release as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: OneOf<[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 */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * 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?: OneOf<[string, null]>; + resolved_by?: null | components["schemas"]["simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: OneOf<[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?: OneOf<[boolean, null]>; + push_protection_bypassed_by?: null | components["schemas"]["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?: OneOf<[string, null]>; + }; + /** @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": OneOf<[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 */ + 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 */ + 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 */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @enum {string} + */ + type: "commit"; + details: components["schemas"]["secret-scanning-location-commit"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: null | components["schemas"]["simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": (number)[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + days: (number)[]; + total: number; + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: null | components["schemas"]["simple-user"]; + total: number; + 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. */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + zipball_url: string; + /** Format: uri */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + id?: number; + created_at?: string; + updated_at?: string; + enabled?: boolean; + 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": { + count: number; + uniques: number; + clones: (components["schemas"]["traffic"])[]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + path: string; + title: string; + count: number; + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + referrer: string; + count: number; + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + count: number; + uniques: number; + views: (components["schemas"]["traffic"])[]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": ({ + object_url?: string; + object_type?: OneOf<[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?: OneOf<[string, null]>; + /** Format: date-time */ + last_modified_at?: string; + 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: null | components["schemas"]["git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: null | components["schemas"]["simple-user"]; + committer: null | components["schemas"]["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; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: OneOf<[string, null]>; + assignees?: OneOf<[(components["schemas"]["simple-user"])[], null]>; + user: null | components["schemas"]["simple-user"]; + labels: ({ + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: OneOf<[string, null]>; + })[]; + state: string; + state_reason?: OneOf<[string, null]>; + assignee: null | components["schemas"]["simple-user"]; + milestone: null | components["schemas"]["milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: OneOf<[string, null]>; + /** Format: uri */ + diff_url: OneOf<[string, null]>; + /** Format: uri */ + html_url: OneOf<[string, null]>; + /** Format: uri */ + patch_url: OneOf<[string, null]>; + /** Format: uri */ + url: OneOf<[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?: null | components["schemas"]["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: OneOf<[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: null | components["schemas"]["simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: OneOf<[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: OneOf<[string, null]>; + size: number; + stargazers_count: number; + watchers_count: number; + language: OneOf<[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: OneOf<[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: null | components["schemas"]["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; + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: OneOf<[string, null]>; + short_description: OneOf<[string, null]>; + description: OneOf<[string, null]>; + created_by: OneOf<[string, null]>; + released: OneOf<[string, null]>; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: OneOf<[number, null]>; + /** Format: uri */ + logo_url?: OneOf<[string, null]>; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: OneOf<[({ + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + })[], null]>; + aliases?: OneOf<[({ + 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: OneOf<[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?: OneOf<[string, null]>; + bio?: OneOf<[string, null]>; + /** Format: email */ + email?: OneOf<[string, null]>; + location?: OneOf<[string, null]>; + site_admin: boolean; + hireable?: OneOf<[boolean, null]>; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: OneOf<[string, null]>; + company?: OneOf<[string, null]>; + /** Format: date-time */ + suspended_at?: OneOf<[string, null]>; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: OneOf<[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: OneOf<[string, null]>; + company: OneOf<[string, null]>; + blog: OneOf<[string, null]>; + location: OneOf<[string, null]>; + /** Format: email */ + email: OneOf<[string, null]>; + hireable: OneOf<[boolean, null]>; + bio: OneOf<[string, null]>; + twitter_username?: OneOf<[string, null]>; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + private_gists: number; + total_private_repos: number; + owned_private_repos: number; + disk_usage: number; + collaborators: number; + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: OneOf<[string, null]>; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** @description The name of the secret */ + 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 + */ + 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. */ + key_id: string; + /** @description The Base64 encoded public key. */ + 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 */ + state?: OneOf<[string, null]>; + /** + * Format: date-time + * @description Completion time of the last export operation + */ + completed_at?: OneOf<[string, null]>; + /** @description Name of the exported branch */ + branch?: OneOf<[string, null]>; + /** @description Git commit SHA of the exported branch */ + sha?: OneOf<[string, null]>; + /** @description Id for the export details */ + id?: string; + /** @description Url for fetching export details */ + export_url?: string; + /** @description Web url for the exported branch */ + html_url?: OneOf<[string, null]>; + }; + /** + * Email + * @description Email + */ + email: { + /** Format: email */ + email: string; + primary: boolean; + verified: boolean; + visibility: OneOf<[string, null]>; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + id: number; + name?: OneOf<[string, null]>; + primary_key_id: OneOf<[number, null]>; + key_id: string; + public_key: string; + emails: ({ + email?: string; + verified?: boolean; + })[]; + subkeys: ({ + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: (Record)[]; + subkeys?: (Record)[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: OneOf<[string, null]>; + raw_key?: OneOf<[string, null]>; + revoked?: boolean; + })[]; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + expires_at: OneOf<[string, null]>; + revoked: boolean; + raw_key: OneOf<[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?: OneOf<[string, null]>; + /** Format: email */ + organization_billing_email?: OneOf<[string, null]>; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + billing_cycle: string; + /** Format: date-time */ + next_billing_date: OneOf<[string, null]>; + unit_count: OneOf<[number, null]>; + on_free_trial: boolean; + /** Format: date-time */ + free_trial_ends_on: OneOf<[string, null]>; + /** Format: date-time */ + updated_at: OneOf<[string, null]>; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * 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; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** @description The ID of the installation. */ + id: number; + /** @description The global node ID of the installation. */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + after?: OneOf<[string, null]>; + app?: components["schemas"]["integration"]; + before?: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "stale" | "startup_failure" | "" | null; + /** Format: date-time */ + created_at?: string; + head_branch?: OneOf<[string, null]>; + /** @description The SHA of the head commit that is being checked. */ + head_sha?: string; + id?: number; + node_id?: string; + pull_requests?: (components["schemas"]["pull-request-minimal"])[]; + repository?: components["schemas"]["minimal-repository"]; + /** @enum {string} */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: null | components["schemas"]["integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** Format: date-time */ + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "waiting" | "pending" | "startup_failure" | "stale" | "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "" | null; + deployment?: components["schemas"]["deployment-simple"]; + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check. */ + name: string; + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: OneOf<[string, null]>; + text: OneOf<[string, null]>; + title: OneOf<[string, null]>; + }; + pull_requests: (components["schemas"]["pull-request-minimal"])[]; + /** Format: date-time */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + url: string; + }; + /** + * 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 */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + archived_at: OneOf<[string, null]>; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * 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. + */ + 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; + 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; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * 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. + */ + 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; + 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; + }; + sender: components["schemas"]["simple-user"]; + }; + /** 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: OneOf<[boolean, null]>; + }; + authorized_actor_names?: { + from: (string)[]; + }; + authorized_actors_only?: { + from: OneOf<[boolean, null]>; + }; + authorized_dismissal_actors_only?: { + from: OneOf<[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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * 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. + */ + 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; + 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; + }; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * 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_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: OneOf<[Record, null]>; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: OneOf<[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: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }; + before: OneOf<[string, null]>; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | "startup_failure" | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: OneOf<[string, null]>; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: OneOf<[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: OneOf<[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" | "" | "pending" | 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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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: OneOf<[string, null]>; + /** User */ + dismissed_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @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; + instances?: (OneOf<[{ + /** @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; + 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]>)[]; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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: OneOf<[string, null]>; + }; + /** Format: uri */ + 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. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @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; + instances?: ((OneOf<[{ + /** @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; + 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]>) & { + /** @enum {string} */ + state: "dismissed"; + })[]; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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?: OneOf<[string, null]>; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: OneOf<[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?: OneOf<[(string)[], null]>; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: OneOf<[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: OneOf<[string, null]>; + }; + /** Format: uri */ + 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. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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: OneOf<[string, null]>; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: null; + dismissed_by: null; + 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: null; + fixed_at?: null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances?: ((OneOf<[{ + /** @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; + 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]>) & ({ + /** @enum {string} */ + state: "open" | "dismissed"; + }))[]; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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?: OneOf<[string, null]>; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: OneOf<[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?: OneOf<[(string)[], null]>; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: OneOf<[{ + guid?: OneOf<[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: OneOf<[string, null]>; + }, null]>; + updated_at?: OneOf<[string, null]>; + /** Format: uri */ + 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. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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: OneOf<[string, null]>; + /** User */ + dismissed_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @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; + instances?: ((OneOf<[{ + /** @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; + 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]>) & { + /** @enum {string} */ + state: "fixed"; + })[]; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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?: OneOf<[string, null]>; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: OneOf<[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?: OneOf<[(string)[], null]>; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: OneOf<[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: OneOf<[string, null]>; + }; + /** Format: uri */ + 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. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: OneOf<[{ + /** + * 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: OneOf<[string, null]>; + dismissed_by: OneOf<[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: OneOf<[string, null]>; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances?: ((OneOf<[{ + /** @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; + 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]>) & { + /** @enum {string} */ + state: "open"; + })[]; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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?: OneOf<[string, null]>; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: OneOf<[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?: OneOf<[(string)[], null]>; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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: OneOf<[string, null]>; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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: null; + dismissed_by: 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: null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances?: ((OneOf<[{ + /** @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; + 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]>) & { + /** @enum {string} */ + state: "open"; + })[]; + /** Alert Instance */ + most_recent_instance?: OneOf<[{ + /** @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; + 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: OneOf<[string, null]>; + }; + /** Format: uri */ + 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. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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/reference/repos#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: OneOf<[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: OneOf<[string, null]>; + /** @description The line index in the diff to which the comment applies. */ + position: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: OneOf<[string, null]>; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: OneOf<[string, null]>; + created_at: string; + id: number; + key: string; + last_used?: OneOf<[string, null]>; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: OneOf<[string, null]>; + created_at: string; + id: number; + key: string; + last_used?: OneOf<[string, null]>; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: OneOf<[{ + /** 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]>; + /** Deployment Workflow Run */ + workflow_run: OneOf<[{ + /** User */ + actor: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: 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?: 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?: 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?: OneOf<[({ + 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?: 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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: OneOf<[{ + /** Format: date-time */ + completed_at: OneOf<[string, null]>; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @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/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: string | Record; + /** + * 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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: OneOf<[{ + /** 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]>; + /** Deployment Workflow Run */ + workflow_run?: OneOf<[{ + /** User */ + actor: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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" | "" | "startup_failure" | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: 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?: 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?: 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?: OneOf<[({ + 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?: 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: { + /** + * 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: 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; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: ({ + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & ({ + active_lock_reason?: OneOf<[string, null]>; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + 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; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: 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; + }; + }); + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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 */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + 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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + 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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: ({ + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + 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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & ({ + active_lock_reason?: null; + answer_chosen_at: null; + answer_chosen_by: null; + answer_html_url: OneOf<[string, null]>; + author_association?: string; + body?: OneOf<[string, null]>; + category?: { + 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; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + 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: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: 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; + }; + }); + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + 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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: ({ + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & { + active_lock_reason?: string; + answer_chosen_at?: OneOf<[string, null]>; + answer_chosen_by?: OneOf<[Record, null]>; + answer_html_url?: OneOf<[string, null]>; + author_association?: string; + body?: string; + category?: { + 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; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + 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: "locked"; + timeline_url?: string; + title?: string; + updated_at?: 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; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: ({ + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & { + active_lock_reason?: OneOf<[string, null]>; + answer_chosen_at: null; + answer_chosen_by: null; + answer_html_url: OneOf<[string, null]>; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + 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; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: 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; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_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: 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; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: ({ + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & { + active_lock_reason?: null; + answer_chosen_at?: null; + answer_chosen_by?: null; + answer_html_url?: null; + author_association?: string; + body?: string; + category?: { + 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; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + 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: "open"; + timeline_url?: string; + title?: string; + updated_at?: 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; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: OneOf<[string, null]>; + answer_chosen_at: OneOf<[string, null]>; + /** User */ + answer_chosen_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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?: OneOf<[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?: OneOf<[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?: null; + languages_url?: string; + license?: OneOf<[Record, null]>; + merges_url?: string; + milestones_url?: string; + mirror_url?: null; + 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?: (null)[]; + 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @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: OneOf<[string, null]>; + /** @description The current page title. */ + title: string; + })[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + 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; + })[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + 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; + })[]; + repository?: components["schemas"]["repository"]; + requester?: null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + 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; + })[]; + repository?: components["schemas"]["repository"]; + requester?: null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + 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 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"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + 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 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"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + 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; + })[]; + repository?: components["schemas"]["repository"]; + requester?: null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: null; + 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?: null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + 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; + })[]; + repository?: components["schemas"]["repository"]; + requester?: null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) 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; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: null | 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[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: OneOf<[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?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) 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; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: null | 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[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: OneOf<[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?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) 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; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: null | 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[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: OneOf<[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?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + locked?: boolean; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + performed_via_github_app?: OneOf<[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; + state?: string; + 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; + }; + }); + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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 */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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 */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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; + state?: string; + 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & ({ + active_lock_reason?: OneOf<[string, null]>; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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; + state?: string; + 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; + }; + }); + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: OneOf<[{ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & ({ + active_lock_reason?: OneOf<[string, null]>; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + locked?: boolean; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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: "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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[string, null]>; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + locked?: boolean; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: OneOf<[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: "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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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 */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: ({ + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }) & { + active_lock_reason: null; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + body?: OneOf<[string, null]>; + closed_at?: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[Record, null]>)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + performed_via_github_app?: 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; + state?: string; + 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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[{ + /** Format: date-time */ + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: OneOf<[number, null]>; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + }, null]>; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: OneOf<[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?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[string, null]>; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: OneOf<[string, null]>; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: OneOf<[string, null]>; + next_billing_date: OneOf<[string, null]>; + on_free_trial?: boolean; + plan?: { + bullets?: (OneOf<[string, null]>)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + price_model?: string; + unit_name?: OneOf<[string, null]>; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: null; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: OneOf<[string, null]>; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: OneOf<[string, null]>; + next_billing_date: OneOf<[string, null]>; + on_free_trial?: boolean; + plan?: { + bullets?: (OneOf<[string, null]>)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + price_model?: string; + unit_name?: OneOf<[string, null]>; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: OneOf<[boolean, null]>; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: OneOf<[string, null]>; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: OneOf<[string, null]>; + next_billing_date: OneOf<[string, null]>; + on_free_trial?: boolean; + plan?: { + bullets?: (OneOf<[string, null]>)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + price_model?: string; + unit_name?: OneOf<[string, null]>; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: null; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: null; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: OneOf<[string, null]>; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: OneOf<[string, null]>; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: OneOf<[string, null]>; + next_billing_date: OneOf<[string, null]>; + on_free_trial?: boolean; + plan?: { + bullets?: (OneOf<[string, null]>)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + price_model?: string; + unit_name?: OneOf<[string, null]>; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: OneOf<[string, null]>; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: null; + next_billing_date?: OneOf<[string, null]>; + on_free_trial: boolean; + plan: { + bullets: (string)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + price_model: string; + unit_name: OneOf<[string, null]>; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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?: OneOf<[string, null]>; + to?: OneOf<[string, null]>; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + 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; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: OneOf<[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: OneOf<[string, null]>; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @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"]; + repository?: null | components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + 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: OneOf<[string, null]>; + /** Format: date-time */ + failed_at: OneOf<[string, null]>; + failed_reason: OneOf<[string, null]>; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + node_id: string; + role: string; + team_count: number; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: OneOf<[string, null]>; + description: OneOf<[string, null]>; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** User */ + author?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[{ + labels?: OneOf<[Record, null]>; + manifest?: OneOf<[Record, null]>; + tag?: { + digest?: string; + name?: string; + }; + }, null]>; + created_at?: string; + description: string; + docker_metadata?: (Record)[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: ({ + [key: string]: unknown | undefined; + })[]; + name: string; + npm_metadata?: OneOf<[{ + name?: string; + version?: string; + npm_user?: string; + author?: OneOf<[Record, null]>; + bugs?: OneOf<[Record, null]>; + dependencies?: Record; + dev_dependencies?: Record; + peer_dependencies?: Record; + optional_dependencies?: Record; + description?: string; + dist?: OneOf<[Record, null]>; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: OneOf<[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?: OneOf<[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?: OneOf<[({ + 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: OneOf<[string, null]>; + name: string; + sha1: OneOf<[string, null]>; + sha256: OneOf<[string, null]>; + size: number; + state: OneOf<[string, null]>; + updated_at: string; + })[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: (Record)[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + }, null]>; + registry: OneOf<[{ + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + }, null]>; + updated_at: OneOf<[string, null]>; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: OneOf<[string, null]>; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: (Record)[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: (Record)[]; + name: string; + package_files: ({ + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: OneOf<[string, null]>; + name: string; + sha1: OneOf<[string, null]>; + sha256: string; + size: number; + state: string; + updated_at: string; + })[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: (Record)[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: OneOf<[{ + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + }, null]>; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-package-v2-create": { + /** @enum {string} */ + action: "create"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + package: { + created_at: string; + description: string; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + package_version: { + blob_store: string; + container_metadata?: { + labels: { + all_labels: { + "com.github.base_image.id"?: string; + "com.github.base_image.repo_digest"?: string; + "com.github.repo.branch"?: string; + "ghes.licenses.path"?: string; + "org.opencontainers.image.created"?: string; + "org.opencontainers.image.description"?: string; + "org.opencontainers.image.documentation"?: string; + "org.opencontainers.image.revision"?: string; + "org.opencontainers.image.source"?: string; + }; + description: string; + image_url: string; + licenses: string; + revision: string; + source: string; + }; + manifest: { + config: { + digest: string; + media_type: string; + size: number; + }; + digest: string; + layers: ({ + digest: string; + media_type: string; + size: number; + })[]; + media_type: string; + size: number; + uri: string; + }; + tag: { + digest: string; + name: string; + }; + }; + created_at: string; + description: string; + html_url: string; + id: number; + name: string; + updated_at: string; + }; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: OneOf<[string, null]>; + created_at: string; + duration: number; + error: { + message: OneOf<[string, null]>; + }; + /** User */ + pusher: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "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"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: OneOf<[number, null]>; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: OneOf<[number, null]>; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: null | components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: OneOf<[string, null]>; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: ({ + after_id?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }) & { + after_id: OneOf<[number, null]>; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: OneOf<[{ + 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?: OneOf<[string, null]>; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: OneOf<[string, null]>; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: OneOf<[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; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: OneOf<[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; + }; + repository?: null | components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: OneOf<[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; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: OneOf<[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; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: OneOf<[string, null]>; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: OneOf<[string, null]>; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + repository?: null | components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: OneOf<[string, null]>; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: OneOf<[string, null]>; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: OneOf<[string, null]>; + /** Format: date-time */ + to?: OneOf<[string, null]>; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: OneOf<[string, null]>; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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?: OneOf<[string, null]>; + to?: OneOf<[string, null]>; + }; + }]>; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: OneOf<[string, null]>; + to?: OneOf<[string, null]>; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: OneOf<[string, null]>; + /** Format: date-time */ + to?: OneOf<[string, null]>; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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; + }, null]>; + sha: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }) & ({ + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: OneOf<[string, null]>; + additions?: number; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + auto_merge?: OneOf<[Record, null]>; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + body?: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: OneOf<[string, null]>; + ref?: string; + repo?: OneOf<[{ + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: OneOf<[{ + 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]>; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }, null]>; + sha?: string; + user?: OneOf<[{ + 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]>; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: (OneOf<[Record, null]>)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged: boolean; + merged_at?: OneOf<[string, null]>; + merged_by?: OneOf<[Record, null]>; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: OneOf<[boolean, null]>; + requested_reviewers?: (OneOf<[Record, null]>)[]; + requested_teams?: (OneOf<[Record, null]>)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_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; + }; + }); + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }) & ({ + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: OneOf<[string, null]>; + additions?: number; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + auto_merge?: OneOf<[Record, null]>; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: null; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + body?: OneOf<[string, null]>; + changed_files?: number; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: OneOf<[{ + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: null; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }, null]>; + sha?: 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; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: (OneOf<[Record, null]>)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: null; + merged_by: null; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: OneOf<[boolean, null]>; + requested_reviewers?: (OneOf<[Record, null]>)[]; + requested_teams?: (OneOf<[Record, null]>)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_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; + }; + }); + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender?: components["schemas"]["simple-user"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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" | "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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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 The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }) & ({ + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: OneOf<[string, null]>; + additions?: number; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + auto_merge?: OneOf<[Record, null]>; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + 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; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + body?: OneOf<[string, null]>; + changed_files?: number; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + 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; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: (OneOf<[Record, null]>)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: boolean; + merged_at: OneOf<[string, null]>; + merged_by: OneOf<[Record, null]>; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: OneOf<[boolean, null]>; + requested_reviewers?: (OneOf<[Record, null]>)[]; + requested_teams?: (OneOf<[Record, null]>)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_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; + }; + }); + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }) & ({ + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: OneOf<[string, null]>; + additions?: number; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + auto_merge?: OneOf<[Record, null]>; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + body?: OneOf<[string, null]>; + changed_files?: number; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: OneOf<[string, null]>; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: (OneOf<[Record, null]>)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged: boolean; + merged_at: OneOf<[string, null]>; + merged_by: OneOf<[Record, null]>; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: OneOf<[boolean, null]>; + requested_reviewers?: (OneOf<[Record, null]>)[]; + requested_teams?: (OneOf<[Record, null]>)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_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; + }; + }); + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + }) & ({ + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: OneOf<[string, null]>; + additions?: number; + assignee?: OneOf<[Record, null]>; + assignees?: (OneOf<[Record, null]>)[]; + author_association?: string; + auto_merge?: null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: null; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + body?: OneOf<[string, null]>; + changed_files?: number; + closed_at: OneOf<[string, null]>; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: OneOf<[string, null]>; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + 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?: OneOf<[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?: OneOf<[string, null]>; + languages_url?: string; + license?: OneOf<[Record, null]>; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: null; + 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; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + 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?: (OneOf<[string, null]>)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: 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; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: (OneOf<[Record, null]>)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged: boolean; + merged_at: OneOf<[string, null]>; + merged_by: OneOf<[Record, null]>; + milestone?: OneOf<[Record, null]>; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: OneOf<[boolean, null]>; + requested_reviewers?: (OneOf<[Record, null]>)[]; + requested_teams?: (OneOf<[Record, null]>)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_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; + }; + }); + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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/reference/pulls#comments) 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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[number, null]>; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[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: OneOf<[number, null]>; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | "" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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?: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) 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: OneOf<[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: OneOf<[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: OneOf<[number, null]>; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[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: OneOf<[number, null]>; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | "" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) 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: OneOf<[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: OneOf<[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: OneOf<[number, null]>; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[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: OneOf<[number, null]>; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | "" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + /** @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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + /** @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: OneOf<[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: OneOf<[string, null]>; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": OneOf<[{ + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + /** User */ + requested_reviewer: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }, { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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"]; + }]>; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": OneOf<[{ + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + /** User */ + requested_reviewer: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + }, { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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"]; + }]>; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[string, null]>; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + /** @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: OneOf<[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: OneOf<[string, null]>; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[string, null]>; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender?: components["schemas"]["simple-user"]; + 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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[number, null]>; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[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: OneOf<[number, null]>; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | "" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + merged_at: OneOf<[string, null]>; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + sender?: components["schemas"]["simple-user"]; + 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: OneOf<[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: OneOf<[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: OneOf<[number, null]>; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: OneOf<[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: OneOf<[number, null]>; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | "" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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]>; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: OneOf<[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 The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: OneOf<[string, null]>; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[string, null]>; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: 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"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-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; + additions?: number; + /** User */ + assignee: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: (OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** @description Commit message for the merge commit. */ + commit_message: OneOf<[string, null]>; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + changed_files?: number; + /** Format: date-time */ + closed_at: OneOf<[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: OneOf<[{ + /** + * @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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[string, null]>; + mergeable?: OneOf<[boolean, null]>; + mergeable_state?: string; + merged?: OneOf<[boolean, null]>; + /** Format: date-time */ + merged_at: OneOf<[string, null]>; + /** User */ + merged_by?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: date-time */ + closed_at: OneOf<[string, null]>; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + due_on: OneOf<[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?: OneOf<[boolean, null]>; + requested_reviewers: (OneOf<[OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: OneOf<[string, null]>; + /** @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 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: ({ + /** @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: OneOf<[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: OneOf<[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; + })[]; + /** @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"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: OneOf<[{ + /** @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: OneOf<[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: OneOf<[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"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: OneOf<[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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: OneOf<[string, null]>; + description: OneOf<[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: OneOf<[{ + 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?: OneOf<[Record, null]>; + manifest?: OneOf<[Record, null]>; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: (Record)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: ({ + [key: string]: unknown | undefined; + })[]; + name: string; + npm_metadata?: OneOf<[{ + name?: string; + version?: string; + npm_user?: string; + author?: string | Record; + bugs?: string | Record; + dependencies?: Record; + dev_dependencies?: Record; + peer_dependencies?: Record; + optional_dependencies?: Record; + description?: string; + dist?: string | Record; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: string | Record; + 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; + 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?: OneOf<[({ + id?: string | Record | number; + 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: OneOf<[string, null]>; + name: string; + sha1: OneOf<[string, null]>; + sha256: OneOf<[string, null]>; + size: number; + state: OneOf<[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?: OneOf<[string, null]>; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: (Record)[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + }, null]>; + registry: OneOf<[{ + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + }, null]>; + updated_at: OneOf<[string, null]>; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: 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; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: (Record)[]; + name: string; + package_files: ({ + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: OneOf<[string, null]>; + name?: string; + sha1?: OneOf<[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?: (Record)[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: OneOf<[Record, null]>; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#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: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#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: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#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: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: ({ + assets: ({ + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }) & { + assets?: (OneOf<[Record, null]>)[]; + assets_url?: string; + 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?: OneOf<[string, null]>; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: OneOf<[string, null]>; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: OneOf<[string, null]>; + tag_name?: string; + tarball_url?: OneOf<[string, null]>; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: ({ + assets: ({ + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }) & { + assets?: (OneOf<[Record, null]>)[]; + assets_url?: string; + 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?: OneOf<[string, null]>; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: OneOf<[string, null]>; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: OneOf<[string, null]>; + tag_name?: string; + tarball_url?: OneOf<[string, null]>; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#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: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: ({ + assets: ({ + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + /** Format: date-time */ + created_at: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + }) & { + assets?: (OneOf<[Record, null]>)[]; + assets_url?: string; + 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?: OneOf<[string, null]>; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: OneOf<[string, null]>; + node_id?: string; + prerelease?: boolean; + published_at: OneOf<[string, null]>; + tag_name?: string; + tarball_url?: OneOf<[string, null]>; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: OneOf<[string, null]>; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: OneOf<[{ + [key: string]: unknown | undefined; + }, null]>; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: OneOf<[string, null]>; + }; + homepage?: { + from: OneOf<[string, null]>; + }; + topics?: { + from?: OneOf<[(string)[], null]>; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: OneOf<[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?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: ({ + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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" | "dismissed" | "fixed"; + }) & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: OneOf<[string, null]>; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: ({ + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: OneOf<[string, null]>; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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" | "dismissed" | "fixed"; + }) & ({ + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: OneOf<[string, null]>; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + external_reference?: OneOf<[string, null]>; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }); + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: ({ + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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" | "dismissed" | "fixed"; + }) & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: OneOf<[string, null]>; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: ({ + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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" | "dismissed" | "fixed"; + }) & ({ + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: OneOf<[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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** 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"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: OneOf<[boolean, null]>; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: OneOf<[string, null]>; + push_protection_bypassed_by?: null | components["schemas"]["simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: "" | "false_positive" | "wont_fix" | "revoked" | "used_in_tests" | "pattern_deleted" | "pattern_edited" | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: OneOf<[string, null]>; + resolved_by?: null | components["schemas"]["simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: OneOf<[string, null]>; + /** @description The secret that was detected. */ + secret?: string; + /** @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; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory performed event */ + "webhook-security-advisory-performed": { + /** @enum {string} */ + action: "performed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: OneOf<[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: OneOf<[{ + identifier: string; + }, null]>; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + })[]; + withdrawn_at: OneOf<[string, null]>; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: OneOf<[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: OneOf<[{ + identifier: string; + }, null]>; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + })[]; + withdrawn_at: OneOf<[string, null]>; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: OneOf<[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: OneOf<[{ + identifier: string; + }, null]>; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + })[]; + withdrawn_at: OneOf<[string, null]>; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: OneOf<[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: OneOf<[{ + identifier: string; + }, null]>; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + })[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** 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"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + 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; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + 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; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + 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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @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: OneOf<[string, null]>; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @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: null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + url: OneOf<[string, null]>; + }; + name: string; + protected: boolean; + })[]; + commit: { + /** User */ + author: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + verified: boolean; + }; + }; + /** User */ + committer: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @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: OneOf<[string, null]>; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * 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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * 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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * 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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** 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; + }; + 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"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * 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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * 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 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: OneOf<[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: OneOf<[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: OneOf<[string, null]>; + /** Format: uri */ + languages_url: string; + /** License */ + license: OneOf<[{ + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: OneOf<[string, null]>; + }, null]>; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + /** Format: uri-template */ + releases_url: string; + role_name?: OneOf<[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"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: OneOf<[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?: OneOf<[{ + /** @description Description of the team */ + description: OneOf<[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; + }; + }; + "webhook-user-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** User */ + user?: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + }, null]>; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: OneOf<[{ + name?: string; + number?: string; + }, null]>; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: ({ + /** Format: uri */ + check_run_url: string; + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "success" | "failure" | "" | "skipped" | "cancelled" | "action_required" | "neutral" | "timed_out" | null; + 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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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" | "waiting"; + steps: ({ + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "cancelled" | "" | null; + name: string; + number: number; + started_at: OneOf<[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"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (OneOf<[string, null]>)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: OneOf<[number, null]>; + runner_group_name?: OneOf<[string, null]>; + runner_id?: OneOf<[number, null]>; + runner_name?: OneOf<[string, null]>; + started_at?: string; + status?: string; + steps?: (OneOf<[Record, null]>)[]; + url?: string; + }); + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: ({ + /** Format: uri */ + check_run_url: string; + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "success" | "failure" | "" | "cancelled" | "neutral" | null; + 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: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[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"; + steps: ({ + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "" | "cancelled" | null; + name: string; + number: number; + started_at: OneOf<[string, null]>; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + })[]; + /** Format: uri */ + url: string; + }) & ({ + check_run_url?: string; + completed_at?: OneOf<[string, null]>; + conclusion?: OneOf<[string, null]>; + 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?: OneOf<[number, null]>; + runner_group_name?: OneOf<[string, null]>; + runner_id?: OneOf<[number, null]>; + runner_name?: OneOf<[string, null]>; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + steps: ({ + completed_at: OneOf<[string, null]>; + conclusion: OneOf<[string, null]>; + name: string; + number: number; + started_at: OneOf<[string, null]>; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + })[]; + url?: string; + }); + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: OneOf<[string, null]>; + conclusion: OneOf<[string, null]>; + 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: OneOf<[number, null]>; + runner_group_name: OneOf<[string, null]>; + runner_id: OneOf<[number, null]>; + runner_name: OneOf<[string, null]>; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: ({ + completed_at: OneOf<[string, null]>; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "cancelled" | "" | null; + name: string; + number: number; + started_at: OneOf<[string, null]>; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + })[]; + /** Format: uri */ + url: string; + }; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: OneOf<[{ + /** 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]>; + workflow_run: ({ + /** User */ + actor: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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" | "" | "skipped" | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: OneOf<[string, null]>; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: OneOf<[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?: OneOf<[({ + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }) & ({ + actor?: { + 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; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "skipped"; + created_at?: string; + event?: string; + head_branch?: OneOf<[string, null]>; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + 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?: OneOf<[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; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: OneOf<[string, null]>; + node_id?: string; + path?: string; + previous_attempt_url?: OneOf<[string, null]>; + pull_requests?: (OneOf<[Record, null]>)[]; + referenced_workflows?: OneOf<[({ + 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?: OneOf<[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; + run_started_at?: string; + status?: string; + triggering_actor?: OneOf<[{ + 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]>; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }); + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: OneOf<[{ + /** 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]>; + workflow_run: ({ + /** User */ + actor: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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" | "skipped" | "" | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: OneOf<[string, null]>; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: OneOf<[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?: OneOf<[({ + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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; + }) & ({ + actor?: { + 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; + }; + 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" | "skipped" | "stale" | "" | null; + created_at?: string; + event?: string; + head_branch?: OneOf<[string, null]>; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + 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?: OneOf<[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?: OneOf<[string, null]>; + 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; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: OneOf<[string, null]>; + node_id?: string; + path?: string; + previous_attempt_url?: OneOf<[string, null]>; + pull_requests?: (OneOf<[Record, null]>)[]; + referenced_workflows?: OneOf<[({ + 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?: OneOf<[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; + run_started_at?: string; + status?: string; + triggering_actor?: { + 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; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }); + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: OneOf<[{ + /** 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]>; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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" | "" | "skipped" | "startup_failure" | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: OneOf<[string, null]>; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: OneOf<[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: OneOf<[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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[string, null]>; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: OneOf<[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?: OneOf<[({ + 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: OneOf<[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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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: OneOf<[{ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: OneOf<[string, null]>; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_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 Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** @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 Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Not modified */ + not_modified: never; + /** @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 Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** @description Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: OneOf<[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 Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @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 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: never; + /** @description Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description A header with no content is returned. */ + no_content: never; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "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 Page number of the results to fetch. */ + page: number; + /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since: string; + /** @description 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 slug version of the enterprise name or the login of an organization. */ + "enterprise-or-org": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description 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 A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `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 The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + */ + "pagination-first": number; + /** + * @description The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + */ + "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 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. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @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/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The unique identifier of the role. */ + "role-id": number; + /** @description The unique identifier of the hook. */ + "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 selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. 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 A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. 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/overview/resources-in-the-rest-api#link-header). 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 slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": "dependency_graph" | "dependabot_alerts" | "dependabot_security_updates" | "advanced_security" | "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 unique identifier of the artifact. */ + "artifact-id": number; + /** @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 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 can set a status of `waiting` or `requested`. */ + "workflow-run-status": "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + 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. */ + 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 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 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. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @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 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 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 The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + 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 external = Record; + +export interface operations { + + "meta/root": { + /** + * GitHub API Root + * @description Get Hypermedia links to resources accessible in GitHub's REST API + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + "apps/get-authenticated": { + /** + * Get the authenticated app + * @description Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + "apps/create-from-manifest": { + /** + * 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`. + */ + parameters: { + path: { + code: string; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & ({ + client_id: string; + client_secret: string; + webhook_secret: OneOf<[string, null]>; + pem: string; + [key: string]: unknown | undefined; + }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "apps/get-webhook-config-for-app": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + "apps/update-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. + */ + 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"]; + }; + }; + }; + }; + "apps/list-webhook-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["hook-delivery-item"])[]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/get-webhook-delivery": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/redeliver-webhook-delivery": { + /** + * 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. + */ + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/list-installations": { + /** + * List installations for the authenticated app + * @description You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + parameters?: { + query?: { + outdated?: string; + }; + }; + responses: { + /** @description The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["installation"])[]; + }; + }; + }; + }; + "apps/get-installation": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "apps/delete-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/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "apps/create-installation-access-token": { + /** + * Create an installation access token for an app + * @description Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 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 */ + 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"]; + }; + }; + "apps/suspend-installation": { + /** + * 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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "apps/unsuspend-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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "apps/delete-authorization": { + /** + * Delete an app authorization + * @description OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/check-token": { + /** + * Check a token + * @description OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/delete-token": { + /** + * Delete an app token + * @description OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/reset-token": { + /** + * Reset a token + * @description OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/scope-token": { + /** + * Create a scoped access token + * @description Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + /** @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. */ + target?: string; + /** @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: (string)[]; + /** @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */ + 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"]; + }; + }; + "apps/get-by-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`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-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"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + /** Get a code of conduct */ + 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"]; + }; + }; + "emojis/get": { + /** + * Get emojis + * @description Lists all the emojis available to use on GitHub. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + [key: string]: string | undefined; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "enterprise-admin/get-server-statistics": { + /** + * Get GitHub Enterprise Server statistics + * @description Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + parameters?: { + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + query?: { + date_start?: string; + date_end?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["server-statistics"]; + }; + }; + }; + }; + "actions/get-actions-cache-usage-for-enterprise": { + /** + * Get GitHub Actions cache usage for an enterprise + * @description Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + "enterprise-admin/get-github-actions-permissions-enterprise": { + /** + * Get GitHub Actions permissions for an enterprise + * @description Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-enterprise-permissions"]; + }; + }; + }; + }; + "enterprise-admin/set-github-actions-permissions-enterprise": { + /** + * Set GitHub Actions permissions for an enterprise + * @description Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { + /** + * List selected organizations enabled for GitHub Actions in an enterprise + * @description Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: (components["schemas"]["organization-simple"])[]; + }; + }; + }; + }; + }; + "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { + /** + * Set selected organizations enabled for GitHub Actions in an enterprise + * @description Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + /** + * Enable a selected organization for GitHub Actions in an enterprise + * @description Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/disable-selected-organization-github-actions-enterprise": { + /** + * Disable a selected organization for GitHub Actions in an enterprise + * @description Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/get-allowed-actions-enterprise": { + /** + * Get allowed actions and reusable workflows for an enterprise + * @description Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + "enterprise-admin/set-allowed-actions-enterprise": { + /** + * Set allowed actions and reusable workflows for an enterprise + * @description Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-github-actions-default-workflow-permissions-enterprise": { + /** + * Get default workflow permissions for an enterprise + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + responses: { + /** @description Success response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + "actions/set-github-actions-default-workflow-permissions-enterprise": { + /** + * Set default workflow permissions for an enterprise + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + responses: { + /** @description Success response */ + 204: never; + }; + }; + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + /** + * List self-hosted runner groups for an enterprise + * @description Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: (components["schemas"]["runner-groups-enterprise"])[]; + }; + }; + }; + }; + }; + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + /** + * Create a self-hosted runner group for an enterprise + * @description Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: (number)[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: (number)[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + /** + * Get a self-hosted runner group for an enterprise + * @description Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { + /** + * Delete a self-hosted runner group from an enterprise + * @description Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { + /** + * Update a self-hosted runner group for an enterprise + * @description Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + requestBody?: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name?: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { + /** + * List organization access to a self-hosted runner group in an enterprise + * @description Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: (components["schemas"]["organization-simple"])[]; + }; + }; + }; + }; + }; + "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { + /** + * Set organization access for a self-hosted runner group in an enterprise + * @description Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + /** + * Add organization access to a self-hosted runner group in an enterprise + * @description Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { + /** + * Remove organization access to a self-hosted runner group in an enterprise + * @description Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { + /** + * List self-hosted runners in a group for an enterprise + * @description Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: (components["schemas"]["runner"])[]; + }; + }; + }; + }; + }; + "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { + /** + * Set self-hosted runners in a group for an enterprise + * @description Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { + /** + * Add a self-hosted runner to a group for an enterprise + * @description Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + /** + * Remove a self-hosted runner from a group for an enterprise + * @description Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/list-self-hosted-runners-for-enterprise": { + /** + * List self-hosted runners for an enterprise + * @description Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count?: number; + runners?: (components["schemas"]["runner"])[]; + }; + }; + }; + }; + }; + "enterprise-admin/list-runner-applications-for-enterprise": { + /** + * List runner applications for an enterprise + * @description Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["runner-application"])[]; + }; + }; + }; + }; + "enterprise-admin/create-registration-token-for-enterprise": { + /** + * Create a registration token for an enterprise + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "enterprise-admin/create-remove-token-for-enterprise": { + /** + * Create a remove token for an enterprise + * @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "enterprise-admin/get-self-hosted-runner-for-enterprise": { + /** + * Get a self-hosted runner for an enterprise + * @description Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + /** + * Delete a self-hosted runner from an enterprise + * @description Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + /** + * List labels for a self-hosted runner for an enterprise + * @description Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + "enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise": { + /** + * Set custom labels for a self-hosted runner for an enterprise + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 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"]; + }; + }; + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + /** + * Add custom labels to a self-hosted runner for an enterprise + * @description Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 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"]; + }; + }; + "enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise": { + /** + * Remove all custom labels from a self-hosted runner for an enterprise + * @description Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise": { + /** + * Remove a custom label from a self-hosted runner for an enterprise + * @description Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "code-scanning/list-alerts-for-enterprise": { + /** + * List code scanning alerts for an enterprise + * @description Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + parameters?: { + /** @description If specified, only code scanning alerts with this state will be returned. */ + /** @description The property by which to sort the results. */ + query?: { + state?: components["schemas"]["code-scanning-alert-state"]; + sort?: "created" | "updated"; + }; + }; + 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"]; + }; + }; + "dependabot/list-alerts-for-enterprise": { + /** + * List Dependabot alerts for an enterprise + * @description Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * 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)." + */ + 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"]; + }; + }; + "secret-scanning/list-alerts-for-enterprise": { + /** + * List secret scanning alerts for an enterprise + * @description Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + 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"]; + }; + }; + "billing/get-github-advanced-security-billing-ghe": { + /** + * Get GitHub Advanced Security active committers for an enterprise + * @description Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + responses: { + /** @description Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + "activity/list-public-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "activity/get-feeds": { + /** + * Get feeds + * @description GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + "gists/list": { + /** + * List gists for the authenticated user + * @description Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + */ + 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"]; + }; + }; + "gists/create": { + /** + * 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. + */ + requestBody: { + content: { + "application/json": { + /** @description Description of the gist */ + description?: string; + /** @description Names and content for the files that make up the gist */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + } | undefined; + }; + 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"]; + }; + }; + "gists/list-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/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + 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"]; + }; + }; + "gists/list-starred": { + /** + * List starred gists + * @description List the authenticated user's starred gists: + */ + 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"]; + }; + }; + "gists/get": { + /** Get a gist */ + 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"]; + }; + }; + "gists/delete": { + /** Delete a gist */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update": { + /** + * 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. + */ + requestBody: { + content: { + "application/json": OneOf<[({ + /** @description The description of the gist. */ + 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`. + */ + files?: { + [key: string]: (OneOf<[{ + /** @description The new content of the file. */ + content?: string; + /** @description The new filename for the file. */ + filename?: OneOf<[string, null]>; + } & (Record | Record | Record), null]>) | undefined; + }; + }) & (Record | Record), null]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/list-comments": { + /** List gist comments */ + 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"]; + }; + }; + "gists/create-comment": { + /** Create a gist comment */ + requestBody: { + content: { + "application/json": { + /** @description The comment text. */ + 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"]; + }; + }; + "gists/get-comment": { + /** Get a gist comment */ + 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"]; + }; + }; + "gists/delete-comment": { + /** Delete a gist comment */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + /** Update a gist comment */ + requestBody: { + content: { + "application/json": { + /** @description The comment text. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-commits": { + /** List gist commits */ + 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"]; + }; + }; + "gists/list-forks": { + /** List gist forks */ + 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"]; + }; + }; + "gists/fork": { + /** Fork a gist */ + 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"]; + }; + }; + "gists/check-is-starred": { + /** Check if a gist is starred */ + responses: { + /** @description Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** @description Not Found if gist is not starred */ + 404: { + content: { + "application/json": Record; + }; + }; + }; + }; + "gists/star": { + /** + * Star a gist + * @description Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + /** Unstar a gist */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + /** Get a gist revision */ + parameters: { + path: { + 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"]; + }; + }; + "gitignore/get-all-templates": { + /** + * Get all gitignore templates + * @description List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (string)[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "gitignore/get-template": { + /** + * Get a gitignore template + * @description The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + parameters: { + path: { + name: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "apps/list-repos-accessible-to-installation": { + /** + * List repositories accessible to the app installation + * @description List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["repository"])[]; + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "apps/revoke-installation-access-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/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/list": { + /** + * 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/reference/pulls#list-pull-requests)" endpoint. + */ + parameters?: { + /** @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. */ + /** @description Indicates the state of the issues to return. */ + /** @description What to sort results by. */ + query?: { + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "repos" | "all"; + state?: "open" | "closed" | "all"; + sort?: "created" | "updated" | "comments"; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + }; + }; + 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"]; + }; + }; + "licenses/get-all-commonly-used": { + /** Get all commonly used licenses */ + parameters?: { + query?: { + featured?: boolean; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["license-simple"])[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + /** Get a license */ + 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"]; + }; + }; + "markdown/render": { + /** Render a Markdown document */ + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default 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"]; + }; + }; + "markdown/render-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. + */ + 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"]; + }; + }; + "apps/get-subscription-plan-for-account": { + /** + * 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. + */ + 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"]; + }; + }; + }; + }; + "apps/list-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. + */ + 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"]; + }; + }; + "apps/list-accounts-for-plan": { + /** + * 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. + */ + parameters?: { + /** @description To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + query?: { + direction?: "asc" | "desc"; + }; + }; + 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"]; + }; + }; + "apps/get-subscription-plan-for-account-stubbed": { + /** + * 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. + */ + 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: never; + }; + }; + "apps/list-plans-stubbed": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["marketplace-listing-plan"])[]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + "apps/list-accounts-for-plan-stubbed": { + /** + * 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. + */ + parameters?: { + /** @description To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + query?: { + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["marketplace-purchase"])[]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + "meta/get": { + /** + * 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/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + /** List public events for a network of repositories */ + 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"]; + }; + }; + "activity/list-notifications-for-authenticated-user": { + /** + * List notifications for the authenticated user + * @description List all notifications for the current user, sorted by most recently updated. + */ + parameters?: { + /** @description The number of results per page (max 50). */ + query?: { + 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"]; + }; + }; + "activity/mark-notifications-as-read": { + /** + * 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/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + 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: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/get-thread": { + /** + * Get a thread + * @description Gets information about a notification thread. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/mark-thread-as-read": { + /** + * 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. + */ + responses: { + /** @description Reset Content */ + 205: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/get-thread-subscription-for-authenticated-user": { + /** + * 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/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + 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"]; + }; + }; + "activity/set-thread-subscription": { + /** + * 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/reference/activity#delete-a-thread-subscription) endpoint. + */ + 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"]; + }; + }; + "activity/delete-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/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "meta/get-octocat": { + /** + * Get Octocat + * @description Get the octocat as ASCII art + */ + parameters?: { + /** @description The words to show in Octocat's speech bubble */ + query?: { + s?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + "orgs/list": { + /** + * List organizations + * @description Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": (components["schemas"]["organization-simple"])[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "orgs/list-custom-roles": { + /** + * List custom repository roles in an organization + * @description List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + parameters: { + /** @description The unique identifier of the organization. */ + path: { + organization_id: string; + }; + }; + responses: { + /** @description Response - list of custom role names */ + 200: { + content: { + "application/json": { + /** @description The number of custom roles in this organization */ + total_count?: number; + custom_roles?: (components["schemas"]["organization-custom-repository-role"])[]; + }; + }; + }; + }; + }; + "orgs/get": { + /** + * Get an organization + * @description To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update": { + /** + * Update an organization + * @description **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + requestBody?: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `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; + 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"]; + }; + }; + }; + }; + "actions/get-actions-cache-usage-for-org": { + /** + * Get GitHub Actions cache usage for an organization + * @description Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + "actions/get-actions-cache-usage-by-repo-for-org": { + /** + * List repositories with GitHub Actions cache usage for an organization + * @description Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + 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"])[]; + }; + }; + }; + }; + }; + "actions/get-github-actions-permissions-organization": { + /** + * 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + "actions/set-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. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-selected-repositories-enabled-github-actions-organization": { + /** + * List selected repositories enabled for GitHub Actions in an organization + * @description Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["repository"])[]; + }; + }; + }; + }; + }; + "actions/set-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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/enable-selected-repository-github-actions-organization": { + /** + * Enable a selected repository for GitHub Actions in an organization + * @description Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/disable-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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-allowed-actions-organization": { + /** + * 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)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + "actions/set-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)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + requestBody?: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-github-actions-default-workflow-permissions-organization": { + /** + * 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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + "actions/set-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)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + requestBody?: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + responses: { + /** @description Success response */ + 204: never; + /** @description Conflict response when changing a setting is prevented by the owning enterprise */ + 409: never; + }; + }; + "actions/list-self-hosted-runner-groups-for-org": { + /** + * List self-hosted runner groups for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: (components["schemas"]["runner-groups-org"])[]; + }; + }; + }; + }; + }; + "actions/create-self-hosted-runner-group-for-org": { + /** + * Create a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: (number)[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: (number)[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + "actions/get-self-hosted-runner-group-for-org": { + /** + * Get a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + "actions/delete-self-hosted-runner-group-from-org": { + /** + * Delete a self-hosted runner group from an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/update-self-hosted-runner-group-for-org": { + /** + * Update a self-hosted runner group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + /** + * List repository access to a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + }; + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + /** + * Set repository access for a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + /** + * Remove repository access to a self-hosted runner group in an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-self-hosted-runners-in-group-for-org": { + /** + * List self-hosted runners in a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: (components["schemas"]["runner"])[]; + }; + }; + }; + }; + }; + "actions/set-self-hosted-runners-in-group-for-org": { + /** + * Set self-hosted runners in a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/add-self-hosted-runner-to-group-for-org": { + /** + * Add a self-hosted runner to a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/remove-self-hosted-runner-from-group-for-org": { + /** + * Remove a self-hosted runner from a group for an organization + * @description The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-self-hosted-runners-for-org": { + /** + * List self-hosted runners for an organization + * @description Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: (components["schemas"]["runner"])[]; + }; + }; + }; + }; + }; + "actions/list-runner-applications-for-org": { + /** + * List runner applications for an organization + * @description Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["runner-application"])[]; + }; + }; + }; + }; + "actions/create-registration-token-for-org": { + /** + * Create a registration token for an organization + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "actions/create-remove-token-for-org": { + /** + * Create a remove token for an organization + * @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "actions/get-self-hosted-runner-for-org": { + /** + * Get a self-hosted runner for an organization + * @description Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + "actions/delete-self-hosted-runner-from-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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-labels-for-self-hosted-runner-for-org": { + /** + * List labels for a self-hosted runner for an organization + * @description Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + "actions/set-custom-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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + /** + * Add custom labels to a self-hosted runner for an organization + * @description Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "actions/remove-all-custom-labels-from-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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + /** + * 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. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "actions/list-org-secrets": { + /** + * List organization secrets + * @description Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["organization-actions-secret"])[]; + }; + }; + }; + }; + }; + "actions/get-org-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. 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + "actions/get-org-secret": { + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + "actions/create-or-update-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 [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + 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)[]; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: never; + }; + }; + "actions/delete-org-secret": { + /** + * Delete an organization secret + * @description Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-selected-repos-for-org-secret": { + /** + * List selected repositories for an organization secret + * @description Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + }; + "actions/set-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/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + 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/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/add-selected-repo-to-org-secret": { + /** + * Add selected repository to an organization secret + * @description Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: never; + /** @description Conflict when visibility type is not set to selected */ + 409: never; + }; + }; + "actions/remove-selected-repo-from-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/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: never; + /** @description Conflict when visibility type not set to selected */ + 409: never; + }; + }; + "orgs/list-blocked-users": { + /** + * List users blocked by an organization + * @description List the users blocked by an organization. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + /** Check if a user is blocked by an organization */ + responses: { + /** @description If the user is blocked */ + 204: never; + /** @description If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + /** Block a user from an organization */ + responses: { + /** @description Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + /** Unblock a user from an organization */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "code-scanning/list-alerts-for-org": { + /** + * 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)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + parameters?: { + /** @description If specified, only code scanning alerts with this state will be returned. */ + /** @description The property by which to sort the results. */ + query?: { + state?: components["schemas"]["code-scanning-alert-state"]; + sort?: "created" | "updated"; + }; + }; + 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"]; + }; + }; + "codespaces/list-in-organization": { + /** + * List codespaces for the organization + * @description Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/set-codespaces-billing": { + /** + * Manage access control for organization codespaces + * @description Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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 be granted access to codespaces in the organization. Required when `visibility` is `selected_members`. */ + selected_usernames?: (string)[]; + }; + }; + }; + responses: { + /** @description Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** @description Users are neither members nor collaborators of this organization. */ + 400: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + "codespaces/list-org-secrets": { + /** + * List organization secrets + * @description Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["codespaces-org-secret"])[]; + }; + }; + }; + }; + }; + "codespaces/get-org-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. You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + "codespaces/get-org-secret": { + /** + * Get an organization secret + * @description Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + "codespaces/create-or-update-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. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + 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/reference/codespaces#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/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#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: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "codespaces/delete-org-secret": { + /** + * Delete an organization secret + * @description Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "codespaces/list-selected-repos-for-org-secret": { + /** + * List selected repositories for an organization secret + * @description Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "codespaces/set-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/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type not set to selected */ + 409: never; + }; + }; + "codespaces/add-selected-repo-to-org-secret": { + /** + * Add selected repository to an organization secret + * @description Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type is not set to selected */ + 409: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "codespaces/remove-selected-repo-from-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/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type not set to selected */ + 409: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/create-custom-role": { + /** + * Create a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + 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 The system role from which this role inherits permissions. + * @enum {string} + */ + base_role: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-custom-role": { + /** + * Get a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Gets a custom repository role that is available to all repositories owned by the organization. + * + * To use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-custom-role": { + /** + * Delete a custom role + * @description **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "orgs/update-custom-role": { + /** + * Update a custom role + * @description **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." + */ + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name?: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. If specified, these permissions will replace any currently set on the role. */ + permissions?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "dependabot/list-alerts-for-org": { + /** + * List Dependabot alerts for an organization + * @description Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + 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"]; + }; + }; + "dependabot/list-org-secrets": { + /** + * List organization secrets + * @description Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["organization-dependabot-secret"])[]; + }; + }; + }; + }; + }; + "dependabot/get-org-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. 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + "dependabot/get-org-secret": { + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + "dependabot/create-or-update-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 [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + 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)[]; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: never; + }; + }; + "dependabot/delete-org-secret": { + /** + * Delete an organization secret + * @description Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "dependabot/list-selected-repos-for-org-secret": { + /** + * List selected repositories for an organization secret + * @description Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + }; + "dependabot/set-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/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "dependabot/add-selected-repo-to-org-secret": { + /** + * Add selected repository to an organization secret + * @description Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: never; + /** @description Conflict when visibility type is not set to selected */ + 409: never; + }; + }; + "dependabot/remove-selected-repo-from-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/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: never; + /** @description Conflict when visibility type not set to selected */ + 409: never; + }; + }; + "activity/list-public-org-events": { + /** List public organization events */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "orgs/list-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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["organization-invitation"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-fine-grained-permissions": { + /** + * List fine-grained permissions for an organization + * @description **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["organization-fine-grained-permission"])[]; + }; + }; + }; + }; + "orgs/list-webhooks": { + /** List organization webhooks */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["org-hook"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/create-webhook": { + /** + * Create an organization webhook + * @description Here's how you can create a hook that posts payloads in JSON format: + */ + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + username?: string; + 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"]; + }; + }; + "orgs/get-webhook": { + /** + * Get an organization webhook + * @description Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + /** Delete an organization webhook */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-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/reference/orgs#update-a-webhook-configuration-for-an-organization)." + */ + requestBody?: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @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; + name?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-webhook-config-for-org": { + /** + * 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/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + "orgs/update-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/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + 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"]; + }; + }; + }; + }; + "orgs/list-webhook-deliveries": { + /** + * List deliveries for an organization webhook + * @description Returns a list of webhook deliveries for a webhook configured in an organization. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["hook-delivery-item"])[]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-webhook-delivery": { + /** + * Get a webhook delivery for an organization webhook + * @description Returns a delivery for a webhook configured in an organization. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/redeliver-webhook-delivery": { + /** + * Redeliver a delivery for an organization webhook + * @description Redeliver a delivery for a webhook configured in an organization. + */ + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/ping-webhook": { + /** + * Ping an organization webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "apps/get-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + "orgs/list-app-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. You must be an organization owner with `admin:read` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + installations: (components["schemas"]["installation"])[]; + }; + }; + }; + }; + }; + "interactions/get-restrictions-for-org": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"] | Record; + }; + }; + }; + }; + "interactions/set-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. + */ + 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"]; + }; + }; + "interactions/remove-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. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "orgs/list-pending-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`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["organization-invitation"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/create-invitation": { + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + 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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: (number)[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/cancel-invitation": { + /** + * 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). + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/list-invitation-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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/list-for-org": { + /** + * 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/reference/pulls#list-pull-requests)" endpoint. + */ + parameters?: { + /** @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. */ + /** @description Indicates the state of the issues to return. */ + /** @description What to sort results by. */ + query?: { + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "repos" | "all"; + state?: "open" | "closed" | "all"; + sort?: "created" | "updated" | "comments"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["issue"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-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. + */ + parameters?: { + /** @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. */ + /** @description Filter members returned by their role. */ + query?: { + filter?: "2fa_disabled" | "all"; + role?: "all" | "admin" | "member"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/check-membership-for-user": { + /** + * Check organization membership for a user + * @description Check if a user is, publicly or privately, a member of the organization. + */ + responses: { + /** @description Response if requester is an organization member and user is a member */ + 204: never; + /** @description Response if requester is not an organization member */ + 302: never; + /** @description Not Found if requester is an organization member and user is not a member */ + 404: never; + }; + }; + "orgs/remove-member": { + /** + * 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. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "codespaces/get-codespaces-for-user-in-org": { + /** + * List codespaces for a user in organization + * @description Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/delete-from-organization": { + /** + * Delete a codespace from the organization + * @description Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/stop-in-organization": { + /** + * Stop a codespace for an organization user + * @description Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 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"]; + }; + }; + "orgs/get-membership-for-user": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/set-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/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + 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"]; + }; + }; + "orgs/remove-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. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/list-for-org": { + /** + * List organization migrations + * @description Lists the most recent migrations. + */ + parameters?: { + /** @description Exclude attributes from the API response to improve performance */ + query?: { + exclude?: ("repositories")[]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["migration"])[]; + }; + }; + }; + }; + "migrations/start-for-org": { + /** + * Start an organization migration + * @description Initiates the generation of a migration archive. + */ + 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 + */ + 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 + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + */ + 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 + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: ("repositories")[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "migrations/get-status-for-org": { + /** + * 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. + */ + parameters?: { + /** @description Exclude attributes from the API response to improve performance */ + query?: { + exclude?: ("repositories")[]; + }; + }; + 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"]; + }; + }; + "migrations/download-archive-for-org": { + /** + * Download an organization migration archive + * @description Fetches the URL to a migration archive. + */ + responses: { + /** @description Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/delete-archive-for-org": { + /** + * Delete an organization migration archive + * @description Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/unlock-repo-for-org": { + /** + * Unlock an organization repository + * @description Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/list-repos-for-org": { + /** + * List repositories in an organization migration + * @description List all the repositories for this organization migration. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-outside-collaborators": { + /** + * List outside collaborators for an organization + * @description List all users who are outside collaborators of an organization. + */ + parameters?: { + /** @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. */ + query?: { + filter?: "2fa_disabled" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "orgs/convert-member-to-outside-collaborator": { + /** + * 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/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + */ + 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: 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/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: never; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/remove-outside-collaborator": { + /** + * Remove outside collaborator from an organization + * @description Removing a user from this list will remove them from all the organization's repositories. + */ + responses: { + /** @description Response */ + 204: never; + /** @description Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + "packages/list-packages-for-organization": { + /** + * List packages for an organization + * @description Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters: { + /** @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. */ + query: { + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["package"])[]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "packages/get-package-for-organization": { + /** + * Get a package for an organization + * @description Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + "packages/delete-package-for-org": { + /** + * 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. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-for-org": { + /** + * Restore a package for an organization + * @description Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + parameters?: { + /** @description package token */ + query?: { + token?: string; + }; + }; + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/get-all-package-versions-for-package-owned-by-org": { + /** + * List package versions for a package owned by an organization + * @description Lists package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters?: { + /** @description The state of the package, either active or deleted. */ + query?: { + state?: "active" | "deleted"; + }; + }; + 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"]; + }; + }; + "packages/get-package-version-for-organization": { + /** + * Get a package version for an organization + * @description Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + "packages/delete-package-version-for-org": { + /** + * Delete package version for an organization + * @description Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-version-for-org": { + /** + * Restore package version for an organization + * @description Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-org": { + /** + * 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. + */ + parameters?: { + /** @description Indicates the state of the projects to return. */ + query?: { + state?: "open" | "closed" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["project"])[]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "projects/create-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. + */ + 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"]; + }; + }; + "orgs/list-public-members": { + /** + * List public organization members + * @description Members of an organization can choose to have their membership publicized or not. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + /** Check public organization membership for a user */ + responses: { + /** @description Response if user is a public member */ + 204: never; + /** @description Not Found if user is not a public member */ + 404: never; + }; + }; + "orgs/set-public-membership-for-authenticated-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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + /** Remove public organization membership for the authenticated user */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/list-for-org": { + /** + * List organization repositories + * @description Lists repositories for the specified organization. + */ + parameters?: { + /** @description Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + /** @description The property to sort the results by. */ + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + query?: { + type?: "all" | "public" | "private" | "forks" | "sources" | "member" | "internal"; + sort?: "created" | "updated" | "pushed" | "full_name"; + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + "repos/create-in-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 scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default 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. + * @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"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "secret-scanning/list-alerts-for-org": { + /** + * List secret scanning alerts for an organization + * @description Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 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"]; + }; + }; + "orgs/list-security-manager-teams": { + /** + * 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)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["team-simple"])[]; + }; + }; + }; + }; + "orgs/add-security-manager-team": { + /** + * 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." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + /** @description The organization has reached the maximum number of security manager teams. */ + 409: never; + }; + }; + "orgs/remove-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." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "billing/get-github-actions-billing-org": { + /** + * Get GitHub Actions billing for an organization + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + "billing/get-github-advanced-security-billing-org": { + /** + * Get GitHub Advanced Security active committers for an organization + * @description Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + responses: { + /** @description Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + "billing/get-github-packages-billing-org": { + /** + * 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)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + "billing/get-shared-storage-billing-org": { + /** + * 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)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + "teams/list": { + /** + * List teams + * @description Lists all teams in an organization that are visible to the authenticated user. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + "teams/create": { + /** + * 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)". + */ + 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 **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"]; + }; + }; + "teams/get-by-name": { + /** + * Get a team by name + * @description Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/delete-in-org": { + /** + * 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}`. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/update-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}`. + */ + 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 **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?: OneOf<[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"]; + }; + }; + "teams/list-discussions-in-org": { + /** + * List discussions + * @description List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + parameters?: { + /** @description Pinned discussions only filter */ + query?: { + pinned?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-discussion"])[]; + }; + }; + }; + }; + "teams/create-discussion-in-org": { + /** + * Create a discussion + * @description Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + 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"]; + }; + }; + }; + }; + "teams/get-discussion-in-org": { + /** + * Get a discussion + * @description Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + "teams/delete-discussion-in-org": { + /** + * Delete a discussion + * @description Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **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}`. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/update-discussion-in-org": { + /** + * Update a discussion + * @description Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + 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"]; + }; + }; + }; + }; + "teams/list-discussion-comments-in-org": { + /** + * List discussion comments + * @description List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-discussion-comment"])[]; + }; + }; + }; + }; + "teams/create-discussion-comment-in-org": { + /** + * Create a discussion comment + * @description Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + 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"]; + }; + }; + }; + }; + "teams/get-discussion-comment-in-org": { + /** + * Get a discussion comment + * @description Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **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}`. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + "teams/delete-discussion-comment-in-org": { + /** + * Delete a discussion comment + * @description Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/update-discussion-comment-in-org": { + /** + * Update a discussion comment + * @description Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + 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"]; + }; + }; + }; + }; + "reactions/list-for-team-discussion-comment-in-org": { + /** + * List reactions for a team discussion comment + * @description List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + }; + }; + "reactions/create-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/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + 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"]; + }; + }; + }; + }; + "reactions/delete-for-team-discussion-comment": { + /** + * Delete team discussion comment reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "reactions/list-for-team-discussion-in-org": { + /** + * List reactions for a team discussion + * @description List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + }; + }; + "reactions/create-for-team-discussion-in-org": { + /** + * Create reaction for a team discussion + * @description Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + "reactions/delete-for-team-discussion": { + /** + * Delete team discussion reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/list-pending-invitations-in-org": { + /** + * 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`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["organization-invitation"])[]; + }; + }; + }; + }; + "teams/list-members-in-org": { + /** + * 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. + */ + parameters?: { + /** @description Filters members returned by their role in the team. */ + query?: { + role?: "member" | "maintainer" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "teams/get-membership-for-user-in-org": { + /** + * Get team membership for a user + * @description Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** @description if user has no team membership */ + 404: never; + }; + }; + "teams/add-or-update-membership-for-user-in-org": { + /** + * Add or update team membership for a user + * @description Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub 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}`. + */ + 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: never; + /** @description Unprocessable Entity if you attempt to add an organization to a team */ + 422: never; + }; + }; + "teams/remove-membership-for-user-in-org": { + /** + * Remove team membership for a user + * @description Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub 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}`. + */ + responses: { + /** @description Response */ + 204: never; + /** @description Forbidden if team synchronization is set up */ + 403: never; + }; + }; + "teams/list-projects-in-org": { + /** + * 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`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-project"])[]; + }; + }; + }; + }; + "teams/check-permissions-for-project-in-org": { + /** + * 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}`. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** @description Not Found if project is not managed by this team */ + 404: never; + }; + }; + "teams/add-or-update-project-permissions-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}`. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }, null]>; + }; + }; + responses: { + /** @description Response */ + 204: never; + /** @description Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + "teams/remove-project-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}`. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/list-repos-in-org": { + /** + * 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`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + "teams/check-permissions-for-repo-in-org": { + /** + * 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. + * + * **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}`. + */ + 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: never; + /** @description Not Found if team does not have permission for the repository */ + 404: never; + }; + }; + "teams/add-or-update-repo-permissions-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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + 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: never; + }; + }; + "teams/remove-repo-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}`. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/list-child-in-org": { + /** + * 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`. + */ + responses: { + /** @description if child teams exist */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + }; + }; + "orgs/enable-or-disable-security-product-on-all-org-repos": { + /** + * Enable or disable a security feature for an organization + * @description Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + responses: { + /** @description Action started */ + 204: never; + /** @description The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: never; + }; + }; + "projects/get-card": { + /** Get a project card */ + 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"]; + }; + }; + "projects/delete-card": { + /** Delete a project card */ + responses: { + /** @description Response */ + 204: 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"]; + }; + }; + "projects/update-card": { + /** Update an existing project card */ + requestBody?: { + content: { + "application/json": { + /** @description The project card's note */ + note?: OneOf<[string, null]>; + /** @description Whether or not the card is archived */ + 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"]; + }; + }; + "projects/move-card": { + /** Move a project card */ + 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. */ + position: string; + /** @description The unique identifier of the column the card should be moved to */ + 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; + })[]; + }; + }; + }; + }; + }; + "projects/get-column": { + /** Get a project column */ + 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"]; + }; + }; + "projects/delete-column": { + /** Delete a project column */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + /** Update an existing project column */ + requestBody: { + content: { + "application/json": { + /** @description Name of the project column */ + 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"]; + }; + }; + "projects/list-cards": { + /** List project cards */ + parameters?: { + /** @description Filters the project cards that are returned by the card's state. */ + query?: { + archived_state?: "all" | "archived" | "not_archived"; + }; + }; + 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"]; + }; + }; + "projects/create-card": { + /** Create a project card */ + requestBody: { + content: { + "application/json": OneOf<[{ + /** @description The project card's note */ + note: OneOf<[string, null]>; + }, { + /** @description The unique identifier of the content associated with the card */ + content_id: number; + /** @description The piece of content associated with the card */ + 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; + })[]; + }; + }; + }; + }; + }; + "projects/move-column": { + /** Move a project column */ + 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. */ + 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"]; + }; + }; + "projects/get": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/delete": { + /** + * Delete a project + * @description Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + responses: { + /** @description Delete Success */ + 204: 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"]; + }; + }; + "projects/update": { + /** + * 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. + */ + requestBody?: { + content: { + "application/json": { + /** @description Name of the project */ + name?: string; + /** @description Body of the project */ + body?: OneOf<[string, null]>; + /** @description State of the project; either 'open' or 'closed' */ + 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: never; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "projects/list-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. + */ + parameters?: { + /** @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. */ + query?: { + affiliation?: "outside" | "direct" | "all"; + }; + }; + 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"]; + }; + }; + "projects/add-collaborator": { + /** + * 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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @description The permission to grant the collaborator. + * @default write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }, null]>; + }; + }; + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/remove-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. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/get-permission-for-user": { + /** + * 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. + */ + 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"]; + }; + }; + "projects/list-columns": { + /** List project columns */ + 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"]; + }; + }; + "projects/create-column": { + /** Create a project column */ + requestBody: { + content: { + "application/json": { + /** @description Name of the project column */ + 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"]; + }; + }; + "rate-limit/get": { + /** + * Get rate limit status for the authenticated user + * @description **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + 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"]; + }; + }; + "repos/get": { + /** + * 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. + */ + 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"]; + }; + }; + "repos/delete": { + /** + * Delete a repository + * @description Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + responses: { + /** @description Response */ + 204: 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"]; + }; + }; + "repos/update": { + /** + * Update a repository + * @description **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. + */ + requestBody?: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/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?: OneOf<[{ + /** @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 `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + 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"]; + }; + }; + "actions/list-artifacts-for-repo": { + /** + * List artifacts for a repository + * @description Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + parameters?: { + /** @description Filters artifacts by exact match on their name field. */ + query?: { + name?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + artifacts: (components["schemas"]["artifact"])[]; + }; + }; + }; + }; + }; + "actions/get-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 you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + "actions/delete-artifact": { + /** + * Delete an artifact + * @description Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/download-artifact": { + /** + * Download an artifact + * @description Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + parameters: { + path: { + archive_format: string; + }; + }; + responses: { + /** @description Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + "actions/get-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, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + "actions/get-actions-cache-list": { + /** + * List GitHub Actions caches for a repository + * @description Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + "actions/delete-actions-cache-by-key": { + /** + * 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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + "actions/delete-actions-cache-by-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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-job-for-workflow-run": { + /** + * Get a job for a workflow run + * @description Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + "actions/download-job-logs-for-workflow-run": { + /** + * Download job logs for a workflow run + * @description Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 302: never; + }; + }; + "actions/re-run-job-for-workflow-run": { + /** + * Re-run a job from a workflow run + * @description Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @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"]; + }; + }; + "actions/get-github-actions-permissions-repository": { + /** + * 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. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + "actions/set-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. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-workflow-access-to-repository": { + /** + * Get the level of access for workflows outside of the repository + * @description Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + "actions/set-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 internal repositories. For more information, see "[Managing GitHub Actions settings for a 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-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-allowed-actions-repository": { + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + "actions/set-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)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + requestBody?: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-github-actions-default-workflow-permissions-repository": { + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + "actions/set-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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + responses: { + /** @description Success response */ + 204: never; + /** @description Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: never; + }; + }; + "actions/list-self-hosted-runners-for-repo": { + /** + * List self-hosted runners for a repository + * @description Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: (components["schemas"]["runner"])[]; + }; + }; + }; + }; + }; + "actions/list-runner-applications-for-repo": { + /** + * List runner applications for a repository + * @description Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["runner-application"])[]; + }; + }; + }; + }; + "actions/create-registration-token-for-repo": { + /** + * Create a registration token for a repository + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "actions/create-remove-token-for-repo": { + /** + * Create a remove token for a repository + * @description Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + "actions/get-self-hosted-runner-for-repo": { + /** + * Get a self-hosted runner for a repository + * @description Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + "actions/delete-self-hosted-runner-from-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. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-labels-for-self-hosted-runner-for-repo": { + /** + * List labels for a self-hosted runner for a repository + * @description Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + "actions/set-custom-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. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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"]; + }; + }; + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + /** + * Add custom labels to a self-hosted runner for a repository + * @description Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 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"]; + }; + }; + "actions/remove-all-custom-labels-from-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. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + /** + * Remove a custom label from a self-hosted runner for a repository + * @description Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "actions/list-workflow-runs-for-repo": { + /** + * List workflow runs for a repository + * @description Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflow_runs: (components["schemas"]["workflow-run"])[]; + }; + }; + }; + }; + }; + "actions/get-workflow-run": { + /** + * Get a workflow run + * @description Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + "actions/delete-workflow-run": { + /** + * Delete a workflow run + * @description Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/get-reviews-for-run": { + /** + * Get the review history for a workflow run + * @description Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["environment-approvals"])[]; + }; + }; + }; + }; + "actions/approve-workflow-run": { + /** + * 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)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "actions/list-workflow-run-artifacts": { + /** + * List workflow run artifacts + * @description Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + artifacts: (components["schemas"]["artifact"])[]; + }; + }; + }; + }; + }; + "actions/get-workflow-run-attempt": { + /** + * Get a workflow run attempt + * @description Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + "actions/list-jobs-for-workflow-run-attempt": { + /** + * List jobs for a workflow run attempt + * @description Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + jobs: (components["schemas"]["job"])[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "actions/download-workflow-run-attempt-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 you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 302: never; + }; + }; + "actions/cancel-workflow-run": { + /** + * Cancel a workflow run + * @description Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + "actions/list-jobs-for-workflow-run": { + /** + * List jobs for a workflow run + * @description Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + */ + parameters?: { + /** @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. */ + query?: { + filter?: "latest" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + jobs: (components["schemas"]["job"])[]; + }; + }; + }; + }; + }; + "actions/download-workflow-run-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 you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 302: never; + }; + }; + "actions/delete-workflow-run-logs": { + /** + * Delete workflow run logs + * @description Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + "actions/get-pending-deployments-for-run": { + /** + * Get pending deployments for a workflow run + * @description Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["pending-deployment"])[]; + }; + }; + }; + }; + "actions/review-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. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description The list of environment ids to approve or reject */ + environment_ids: (number)[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @enum {string} + */ + state: "approved" | "rejected"; + /** @description A comment to accompany the deployment review */ + comment: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["deployment"])[]; + }; + }; + }; + }; + "actions/re-run-workflow": { + /** + * Re-run a workflow + * @description Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @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"]; + }; + }; + }; + }; + "actions/re-run-workflow-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. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @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"]; + }; + }; + }; + }; + "actions/get-workflow-run-usage": { + /** + * 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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + "actions/list-repo-secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["actions-secret"])[]; + }; + }; + }; + }; + }; + "actions/get-repo-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 you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + "actions/get-repo-secret": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + "actions/create-or-update-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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: never; + }; + }; + "actions/delete-repo-secret": { + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-repo-workflows": { + /** + * List repository workflows + * @description Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflows: (components["schemas"]["workflow"])[]; + }; + }; + }; + }; + }; + "actions/get-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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + "actions/disable-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`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/create-workflow-dispatch": { + /** + * Create a workflow dispatch event + * @description You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { + [key: string]: string | undefined; + }; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/enable-workflow": { + /** + * Enable a workflow + * @description Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "actions/list-workflow-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/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflow_runs: (components["schemas"]["workflow-run"])[]; + }; + }; + }; + }; + }; + "actions/get-workflow-usage": { + /** + * 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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + "issues/list-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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/check-user-can-be-assigned": { + /** + * 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. + */ + parameters: { + path: { + assignee: string; + }; + }; + responses: { + /** @description If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** @description Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "repos/list-autolinks": { + /** + * List all autolinks of a repository + * @description This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["autolink"])[]; + }; + }; + }; + }; + "repos/create-autolink": { + /** + * Create an autolink reference for a repository + * @description Users with admin access to the repository can create an autolink. + */ + 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"]; + }; + }; + "repos/get-autolink": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/enable-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)". + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/disable-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)". + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/list-branches": { + /** List branches */ + parameters?: { + /** @description Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + query?: { + protected?: boolean; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["short-branch"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + /** Get a branch */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-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. + */ + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: OneOf<[{ + /** @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: OneOf<[boolean, null]>; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: OneOf<[{ + /** @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 someone other than the person who last pushed to the branch must approve this pull request. 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: OneOf<[{ + /** @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?: OneOf<[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"]; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "repos/get-admin-branch-protection": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + "repos/set-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-pull-request-review-protection": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-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. + */ + 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 someone other than the person who last pushed to the branch must approve this pull request. 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"]; + }; + }; + "repos/get-commit-signature-protection": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-status-checks-protection": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/remove-status-check-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. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/update-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. + */ + 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"]; + }; + }; + "repos/get-all-status-check-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (string)[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/set-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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (string)[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/add-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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (string)[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/remove-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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (string)[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-access-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/get-apps-with-access-to-protected-branch": { + /** + * 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 installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["integration"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/set-app-access-restrictions": { + /** + * 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 installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["integration"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/add-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 installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["integration"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/remove-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 installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["integration"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-teams-with-access-to-protected-branch": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/set-team-access-restrictions": { + /** + * 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. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/add-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. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/remove-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. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-users-with-access-to-protected-branch": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/set-user-access-restrictions": { + /** + * 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. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/add-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. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/remove-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. | + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/rename-branch": { + /** + * 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 permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + 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"]; + }; + }; + "checks/create": { + /** + * 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. + */ + requestBody: { + content: { + "application/json": OneOf<[{ + /** @enum {unknown} */ + status: "completed"; + [key: string]: unknown | undefined; + }, { + /** @enum {unknown} */ + status?: "queued" | "in_progress"; + [key: string]: unknown | undefined; + }]>; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + "checks/get": { + /** + * Get 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. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + "checks/update": { + /** + * Update a check run + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + 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. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: "action_required" | "cancelled" | "failure" | "neutral" | "success" | "skipped" | "stale" | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + 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. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: ({ + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + })[]; + }) & (({ + /** @enum {unknown} */ + status?: "completed"; + [key: string]: unknown | undefined; + }) | ({ + /** @enum {unknown} */ + status?: "queued" | "in_progress"; + [key: string]: unknown | undefined; + })); + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + "checks/list-annotations": { + /** + * List check run annotations + * @description Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["check-annotation"])[]; + }; + }; + }; + }; + "checks/rerequest-run": { + /** + * Rerequest a check run + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + 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"]; + }; + }; + }; + }; + "checks/create-suite": { + /** + * Create a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + 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"]; + }; + }; + }; + }; + "checks/set-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/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + 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"]; + }; + }; + }; + }; + "checks/get-suite": { + /** + * Get a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + "checks/list-for-suite": { + /** + * List check runs in a check suite + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + parameters?: { + /** @description Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + query?: { + filter?: "latest" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_runs: (components["schemas"]["check-run"])[]; + }; + }; + }; + }; + }; + "checks/rerequest-suite": { + /** + * 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. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + "code-scanning/list-alerts-for-repo": { + /** + * List code scanning alerts for a repository + * @description Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + parameters?: { + /** @description The property by which to sort the results. */ + /** @description If specified, only code scanning alerts with this state will be returned. */ + query?: { + sort?: "created" | "updated"; + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + 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"]; + }; + }; + "code-scanning/get-alert": { + /** + * Get a code scanning alert + * @description Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + 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"]; + }; + }; + "code-scanning/update-alert": { + /** + * Update a code scanning alert + * @description Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + */ + 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"]; + }; + }; + "code-scanning/list-alert-instances": { + /** + * List instances of a code scanning alert + * @description Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 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"]; + }; + }; + "code-scanning/list-recent-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. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + parameters?: { + /** @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`. */ + /** @description Filter analyses belonging to the same SARIF upload. */ + /** @description The property by which to sort the results. */ + query?: { + ref?: components["schemas"]["code-scanning-ref"]; + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + sort?: "created"; + }; + }; + 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"]; + }; + }; + "code-scanning/get-analysis": { + /** + * Get a code scanning analysis for a repository + * @description Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + parameters: { + /** @description The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + path: { + analysis_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { + [key: string]: unknown | undefined; + }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "code-scanning/delete-analysis": { + /** + * Delete a code scanning analysis from a repository + * @description Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * 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. + */ + parameters: { + /** @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.` */ + query?: { + confirm_delete?: OneOf<[string, null]>; + }; + /** @description The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + path: { + 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"]; + }; + }; + "code-scanning/list-codeql-databases": { + /** + * List CodeQL databases for a repository + * @description Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + 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"]; + }; + }; + "code-scanning/get-codeql-database": { + /** + * 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. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + parameters: { + /** @description The language of the CodeQL database. */ + path: { + 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"]; + }; + }; + "code-scanning/upload-sarif": { + /** + * Upload an analysis as SARIF data + * @description Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + */ + 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: 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: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "code-scanning/get-sarif": { + /** + * Get information about a SARIF upload + * @description Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + parameters: { + /** @description The SARIF ID obtained after uploading. */ + path: { + 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: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "repos/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)." + */ + parameters?: { + /** @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`) */ + query?: { + ref?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** @description Resource not found */ + 404: never; + }; + }; + "codespaces/list-in-repository-for-authenticated-user": { + /** + * List codespaces in a repository for the authenticated user + * @description Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/create-with-repo-for-authenticated-user": { + /** + * Create a codespace in a repository + * @description Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": OneOf<[{ + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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"]; + }; + }; + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + /** + * 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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: ({ + path: string; + 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"]; + }; + }; + "codespaces/repo-machines-for-authenticated-user": { + /** + * List available machine types for a repository + * @description List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + parameters?: { + /** @description The location to check for available machines. Assigned by IP if not provided. */ + /** @description IP for location auto-detection when proxying a request */ + query?: { + location?: string; + client_ip?: string; + }; + }; + 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"]; + }; + }; + "codespaces/pre-flight-with-repo-for-authenticated-user": { + /** + * Get default attributes for a codespace + * @description Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + parameters?: { + /** @description The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + /** @description An alternative IP for default location auto-detection, such as when proxying a request. */ + query?: { + ref?: string; + client_ip?: string; + }; + }; + 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: OneOf<[string, null]>; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codespaces/list-repo-secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["repo-codespaces-secret"])[]; + }; + }; + }; + }; + }; + "codespaces/get-repo-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 you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + "codespaces/get-repo-secret": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + "codespaces/create-or-update-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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of 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 of 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 of 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) + * ``` + */ + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#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: never; + }; + }; + "codespaces/delete-repo-secret": { + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/list-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. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + parameters?: { + /** @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. */ + /** @description Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + query?: { + affiliation?: "outside" | "direct" | "all"; + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["collaborator"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/check-collaborator": { + /** + * Check if a user is a repository collaborator + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + responses: { + /** @description Response if user is a collaborator */ + 204: never; + /** @description Not Found if user is not a collaborator */ + 404: never; + }; + }; + "repos/add-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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). + * + * **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. + */ + 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: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/remove-collaborator": { + /** Remove a repository collaborator */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/get-collaborator-permission-level": { + /** + * Get repository permissions for a user + * @description Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. + */ + responses: { + /** @description if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/list-commit-comments-for-repo": { + /** + * List commit comments for a repository + * @description Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["commit-comment"])[]; + }; + }; + }; + }; + "repos/get-commit-comment": { + /** Get a commit comment */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + /** Delete a commit comment */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + /** Update a commit comment */ + 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"]; + }; + }; + "reactions/list-for-commit-comment": { + /** + * List reactions for a commit comment + * @description List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "reactions/create-for-commit-comment": { + /** + * Create reaction for a commit comment + * @description Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + 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"]; + }; + }; + "reactions/delete-for-commit-comment": { + /** + * Delete a commit comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/list-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 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. | + */ + parameters?: { + /** @description SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + /** @description Only commits containing this file path will be returned. */ + /** @description GitHub login or email address by which to filter by commit author. */ + /** @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`. */ + query?: { + sha?: string; + path?: string; + author?: string; + until?: string; + }; + }; + 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"]; + }; + }; + "repos/list-branches-for-head-commit": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["branch-short"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-comments-for-commit": { + /** + * List commit comments + * @description Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["commit-comment"])[]; + }; + }; + }; + }; + "repos/create-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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + 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"]; + }; + }; + "repos/list-pull-requests-associated-with-commit": { + /** + * List pull requests associated with a commit + * @description Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results only include open pull requests. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["pull-request-simple"])[]; + }; + }; + }; + }; + "repos/get-commit": { + /** + * Get a commit + * @description Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "checks/list-for-ref": { + /** + * List check runs for a Git reference + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + parameters: { + /** @description Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + query?: { + filter?: "latest" | "all"; + app_id?: number; + }; + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_runs: (components["schemas"]["check-run"])[]; + }; + }; + }; + }; + }; + "checks/list-suites-for-ref": { + /** + * List check suites for a Git reference + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + parameters: { + /** + * @description Filters check suites by GitHub App `id`. + * @example 1 + */ + query?: { + app_id?: number; + }; + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_suites: (components["schemas"]["check-suite"])[]; + }; + }; + }; + }; + }; + "repos/get-combined-status-for-ref": { + /** + * 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` + */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/list-commit-statuses-for-ref": { + /** + * 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`. + */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["status"])[]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + "repos/get-community-profile-metrics": { + /** + * Get community profile metrics + * @description Returns all community profile metrics for a repository. The repository must be public, and 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 + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + "repos/compare-commits": { + /** + * Compare two commits + * @description The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response 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. | + */ + parameters: { + /** @description The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + path: { + 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"]; + }; + }; + "repos/get-content": { + /** + * Get repository content + * @description Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * The response will be an array of objects, one object for each item in the directory. + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value + * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). + * In the next major version of the API, the type will be returned as "submodule". + * + * #### If the content is a symlink + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the + * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific + * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out + * the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the + * github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + parameters: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + query?: { + ref?: string; + }; + /** @description path parameter */ + path: { + 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"]; + }; + }; + "repos/create-or-update-file-contents": { + /** + * Create or update file contents + * @description Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + parameters: { + /** @description path parameter */ + path: { + 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 (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + 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; + 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"]; + }; + }; + "repos/delete-file": { + /** + * 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/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + parameters: { + /** @description path parameter */ + path: { + 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 (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + 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"]; + }; + }; + "repos/list-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. + */ + parameters?: { + /** @description Set to `1` or `true` to include anonymous contributors in results. */ + query?: { + anon?: string; + }; + }; + 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: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "dependabot/list-alerts-for-repo": { + /** + * List Dependabot alerts for a repository + * @description You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + parameters?: { + /** + * @deprecated + * @description **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + */ + /** + * @deprecated + * @description **Deprecated**. The number of results per page (max 100). Use cursor-based pagination with `first` or `last` instead. + */ + query?: { + page?: number; + per_page?: number; + }; + }; + 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"]; + }; + }; + "dependabot/get-alert": { + /** + * Get a Dependabot alert + * @description You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + 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"]; + }; + }; + "dependabot/update-alert": { + /** + * Update a Dependabot alert + * @description You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + 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"]; + }; + }; + "dependabot/list-repo-secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["dependabot-secret"])[]; + }; + }; + }; + }; + }; + "dependabot/get-repo-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 you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + "dependabot/get-repo-secret": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + "dependabot/create-or-update-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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: never; + }; + }; + "dependabot/delete-repo-secret": { + /** + * Delete a repository secret + * @description Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "dependency-graph/diff-range": { + /** + * 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. + */ + parameters: { + /** @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}`. */ + path: { + basehead: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "dependency-graph/create-repository-snapshot": { + /** + * Create a snapshot of dependencies for a repository + * @description Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. + */ + 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; + }; + }; + }; + }; + }; + "repos/list-deployments": { + /** + * List deployments + * @description Simple filtering of deployments is available via query parameters: + */ + parameters?: { + /** @description The SHA recorded at creation time. */ + /** @description The name of the ref. This can be a branch, tag, or SHA. */ + /** @description The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + /** @description The name of the environment that was deployed to (e.g., `staging` or `production`). */ + query?: { + sha?: string; + ref?: string; + task?: string; + environment?: OneOf<[string, null]>; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["deployment"])[]; + }; + }; + }; + }; + "repos/create-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. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. + * + * #### Merged branch response + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * #### Merge conflict response + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * #### Failed commit status checks + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + 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 | undefined; + }, 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?: OneOf<[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: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-deployment": { + /** Get a deployment */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-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. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "repos/list-deployment-statuses": { + /** + * List deployment statuses + * @description Users with pull access can view deployment statuses for a deployment: + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["deployment-status"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-deployment-status": { + /** + * Create a deployment status + * @description Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + 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`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean; + }; + }; + }; + 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"]; + }; + }; + "repos/get-deployment-status": { + /** + * Get a deployment status + * @description Users with pull access can view a deployment status for a deployment: + */ + parameters: { + path: { + status_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-dispatch-event": { + /** + * 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 endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + 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 | undefined; + }; + }; + }; + }; + responses: { + /** @description Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-all-environments": { + /** + * List environments + * @description Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + /** @description The number of environments in this repository */ + total_count?: number; + environments?: (components["schemas"]["environment"])[]; + }; + }; + }; + }; + }; + "repos/get-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. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + "repos/create-or-update-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 "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: OneOf<[({ + type?: components["schemas"]["deployment-reviewer-type"]; + /** @description The id of the user or team who can review the deployment */ + 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"]; + }; + }; + }; + }; + "repos/delete-an-environment": { + /** + * Delete an environment + * @description You must authenticate using an access token with the repo scope to use this endpoint. + */ + responses: { + /** @description Default response */ + 204: never; + }; + }; + "repos/list-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. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + /** @description The number of deployment branch policies for the environment. */ + total_count: number; + branch_policies: (components["schemas"]["deployment-branch-policy"])[]; + }; + }; + }; + }; + }; + "repos/create-deployment-branch-policy": { + /** + * Create a deployment branch policy + * @description Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** @description Response if the same branch name pattern already exists */ + 303: never; + /** @description Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: never; + }; + }; + "repos/get-deployment-branch-policy": { + /** + * Get a deployment branch policy + * @description Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + "repos/update-deployment-branch-policy": { + /** + * Update a deployment branch policy + * @description Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + "repos/delete-deployment-branch-policy": { + /** + * Delete a deployment branch policy + * @description Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + /** List repository events */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "repos/list-forks": { + /** List forks */ + parameters?: { + /** @description The sort order. `stargazers` will sort by star count. */ + query?: { + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + "repos/create-fork": { + /** + * 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). + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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"]; + }; + }; + "git/create-blob": { + /** Create a blob */ + 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"]; + }; + }; + "git/get-blob": { + /** + * Get a blob + * @description The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + parameters: { + path: { + file_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/create-commit": { + /** + * Create a commit + * @description Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 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"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/get-commit": { + /** + * Get a commit + * @description Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "git/list-matching-refs": { + /** + * List matching references + * @description Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["git-ref"])[]; + }; + }; + }; + }; + "git/get-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/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "git/create-ref": { + /** + * 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. + */ + 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; + key?: 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"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/delete-ref": { + /** Delete a reference */ + parameters: { + /** @description ref parameter */ + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + /** Update a reference */ + parameters: { + /** + * @description The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. + * @example refs/head/master + */ + path: { + ref: string; + }; + }; + 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"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/create-tag": { + /** + * Create a tag object + * @description Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 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"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/get-tag": { + /** + * Get a tag + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + parameters: { + path: { + tag_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "git/create-tree": { + /** + * Create a tree + * @description The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + 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?: OneOf<[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"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/get-tree": { + /** + * Get a tree + * @description Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + parameters: { + /** @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. */ + query?: { + recursive?: string; + }; + path: { + tree_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-webhooks": { + /** + * List repository webhooks + * @description Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["hook"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-webhook": { + /** + * 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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + token?: string; + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: (string)[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }, null]>; + }; + }; + 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"]; + }; + }; + "repos/get-webhook": { + /** + * Get a repository webhook + * @description Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + /** Delete a repository webhook */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-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/reference/repos#update-a-webhook-configuration-for-a-repository)." + */ + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + address?: string; + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: (string)[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: (string)[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: (string)[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-webhook-config-for-repo": { + /** + * Get a webhook configuration for a repository + * @description Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + "repos/update-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/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + 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"]; + }; + }; + }; + }; + "repos/list-webhook-deliveries": { + /** + * List deliveries for a repository webhook + * @description Returns a list of webhook deliveries for a webhook configured in a repository. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["hook-delivery-item"])[]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-webhook-delivery": { + /** + * Get a delivery for a repository webhook + * @description Returns a delivery for a webhook configured in a repository. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/redeliver-webhook-delivery": { + /** + * Redeliver a delivery for a repository webhook + * @description Redeliver a webhook delivery for a webhook configured in a repository. + */ + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/ping-webhook": { + /** + * Ping a repository webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/test-push-webhook": { + /** + * 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` + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/get-import-status": { + /** + * Get an import status + * @description View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + "migrations/start-import": { + /** + * Start an import + * @description Start a source import to a GitHub repository using GitHub Importer. + */ + 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"]; + }; + }; + "migrations/cancel-import": { + /** + * Cancel an import + * @description Stop an import for a repository. + */ + responses: { + /** @description Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + "migrations/update-import": { + /** + * Update an import + * @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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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. + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }, null]>; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + "migrations/get-commit-authors": { + /** + * Get commit authors + * @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/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["porter-author"])[]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + "migrations/map-commit-author": { + /** + * Map a commit author + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + parameters: { + path: { + 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"]; + }; + }; + "migrations/get-large-files": { + /** + * Get large files + * @description List files larger than 100MB found during the import + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["porter-large-file"])[]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + "migrations/set-lfs-preference": { + /** + * Update Git LFS preference + * @description You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). + */ + 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"]; + }; + }; + "apps/get-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + "interactions/get-restrictions-for-repo": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"] | Record; + }; + }; + }; + }; + "interactions/set-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. + */ + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** @description Response */ + 409: never; + }; + }; + "interactions/remove-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. + */ + responses: { + /** @description Response */ + 204: never; + /** @description Response */ + 409: never; + }; + }; + "repos/list-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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["repository-invitation"])[]; + }; + }; + }; + }; + "repos/delete-invitation": { + /** Delete a repository invitation */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/update-invitation": { + /** Update a repository invitation */ + requestBody?: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + }; + "issues/list-for-repo": { + /** + * 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/reference/pulls#list-pull-requests)" endpoint. + */ + parameters?: { + /** @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. */ + /** @description Indicates the state of the issues to return. */ + /** @description Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ + /** @description The user that created the issue. */ + /** @description A user that's mentioned in the issue. */ + /** @description What to sort results by. */ + query?: { + milestone?: string; + state?: "open" | "closed" | "all"; + assignee?: string; + creator?: string; + mentioned?: string; + sort?: "created" | "updated" | "comments"; + }; + }; + 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"]; + }; + }; + "issues/create": { + /** + * Create an issue + * @description Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 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?: OneOf<[string, null]>; + milestone?: string | number; + /** @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?: OneOf<[string, null]>; + color?: OneOf<[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"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "issues/list-comments-for-repo": { + /** + * List issue comments for a repository + * @description By default, Issue Comments are ordered by ascending ID. + */ + parameters?: { + /** @description Either `asc` or `desc`. Ignored without the `sort` parameter. */ + query?: { + direction?: "asc" | "desc"; + }; + }; + 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"]; + }; + }; + "issues/get-comment": { + /** Get an issue comment */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + /** Delete an issue comment */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/update-comment": { + /** Update an issue comment */ + 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"]; + }; + }; + "reactions/list-for-issue-comment": { + /** + * List reactions for an issue comment + * @description List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "reactions/create-for-issue-comment": { + /** + * Create reaction for an issue comment + * @description Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + 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"]; + }; + }; + "reactions/delete-for-issue-comment": { + /** + * Delete an issue comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + /** List issue events for a repository */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["issue-event"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + /** Get an issue event */ + parameters: { + path: { + 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"]; + }; + }; + "issues/get": { + /** + * Get an issue + * @description The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [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/reference/pulls#list-pull-requests)" endpoint. + */ + 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"]; + }; + }; + "issues/update": { + /** + * Update an issue + * @description Issue owners and users with push access can edit an issue. + */ + requestBody?: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: string | number; + /** @description The contents of the issue. */ + body?: OneOf<[string, null]>; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: OneOf<[string, null]>; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @enum {string|null} + */ + state_reason?: "completed" | "not_planned" | "reopened" | "" | null; + milestone?: string | number; + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: (OneOf<[string, { + id?: number; + name?: string; + description?: OneOf<[string, null]>; + color?: OneOf<[string, null]>; + }]>)[]; + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: (string)[]; + }; + }; + }; + 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"]; + }; + }; + "issues/add-assignees": { + /** + * Add assignees to an issue + * @description Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + */ + 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"]; + }; + }; + }; + }; + "issues/remove-assignees": { + /** + * Remove assignees from an issue + * @description Removes one or more assignees from an issue. + */ + requestBody?: { + content: { + "application/json": { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: (string)[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + }; + "issues/list-comments": { + /** + * List issue comments + * @description Issue Comments are ordered by ascending ID. + */ + 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"]; + }; + }; + "issues/create-comment": { + /** + * Create an issue comment + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 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"]; + }; + }; + "issues/list-events": { + /** List issue events */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["issue-event-for-issue"])[]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + /** List labels for an issue */ + 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"]; + }; + }; + "issues/set-labels": { + /** + * Set labels for an issue + * @description Removes any previous labels and sets the new labels for an issue. + */ + 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/reference/issues#add-labels-to-an-issue)." */ + labels?: (string)[]; + }, (string)[], { + labels?: ({ + name: string; + })[]; + }, ({ + name: string; + })[], 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"]; + }; + }; + "issues/add-labels": { + /** Add labels to an issue */ + 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/reference/issues#set-labels-for-an-issue)." */ + labels?: (string)[]; + }, (string)[], { + labels?: ({ + name: string; + })[]; + }, ({ + name: string; + })[], 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"]; + }; + }; + "issues/remove-all-labels": { + /** Remove all labels from an issue */ + responses: { + /** @description Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "issues/remove-label": { + /** + * 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. + */ + parameters: { + path: { + 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"]; + }; + }; + "issues/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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** + * @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: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/unlock": { + /** + * Unlock an issue + * @description Users with push access can unlock an issue's conversation. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "reactions/list-for-issue": { + /** + * List reactions for an issue + * @description List the reactions to an [issue](https://docs.github.com/rest/reference/issues). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "reactions/create-for-issue": { + /** + * Create reaction for an issue + * @description Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "reactions/delete-for-issue": { + /** + * 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/reference/issues/). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + /** List timeline events for an issue */ + 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"]; + }; + }; + "repos/list-deploy-keys": { + /** List deploy keys */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["deploy-key"])[]; + }; + }; + }; + }; + "repos/create-deploy-key": { + /** + * Create a deploy key + * @description You can create a read-only deploy key. + */ + 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"]; + }; + }; + "repos/get-deploy-key": { + /** Get a deploy key */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-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. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + /** List labels for a repository */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["label"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + /** Create a label */ + 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"]; + }; + }; + "issues/get-label": { + /** Get a label */ + parameters: { + path: { + name: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + /** Delete a label */ + parameters: { + path: { + name: string; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/update-label": { + /** Update a label */ + parameters: { + path: { + 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"]; + }; + }; + }; + }; + "repos/list-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + "repos/enable-lfs-for-repo": { + /** + * Enable Git LFS for a repository + * @description Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. + */ + responses: { + 202: components["responses"]["accepted"]; + /** + * @description We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: never; + }; + }; + "repos/disable-lfs-for-repo": { + /** + * Disable Git LFS for a repository + * @description Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "licenses/get-for-repo": { + /** + * Get the license for a repository + * @description This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + "repos/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. + */ + 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: never; + /** @description The branch could not be synced for some other reason */ + 422: never; + }; + }; + "repos/merge": { + /** Merge a branch */ + 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: never; + 403: components["responses"]["forbidden"]; + /** @description Not Found when the base or head does not exist */ + 404: never; + /** @description Conflict when there is a merge conflict */ + 409: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/list-milestones": { + /** List milestones */ + parameters?: { + /** @description The state of the milestone. Either `open`, `closed`, or `all`. */ + /** @description What to sort results by. Either `due_on` or `completeness`. */ + /** @description The direction of the sort. Either `asc` or `desc`. */ + query?: { + state?: "open" | "closed" | "all"; + sort?: "due_on" | "completeness"; + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["milestone"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + /** Create a milestone */ + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + }; + }; + 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"]; + }; + }; + "issues/get-milestone": { + /** Get a milestone */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + /** Delete a milestone */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + /** Update a milestone */ + requestBody?: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + /** List labels for issues in a milestone */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["label"])[]; + }; + }; + }; + }; + "activity/list-repo-notifications-for-authenticated-user": { + /** + * List repository notifications for the authenticated user + * @description Lists all notifications for the current user in the specified repository. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["thread"])[]; + }; + }; + }; + }; + "activity/mark-repo-notifications-as-read": { + /** + * 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/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + 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: never; + }; + }; + "repos/get-pages": { + /** Get a GitHub Pages site */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-information-about-pages-site": { + /** + * 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). + */ + 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?: OneOf<[string, null]>; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; + /** + * @description The 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"; + }); + }) & (Record | Record | Record | Record | Record); + }; + }; + responses: { + /** @description Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/create-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)." You must be an admin of the repository in order to use this operation. + */ + requestBody: { + content: { + "application/json": OneOf<[({ + /** + * @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"; + }; + }) & (Record | Record), null]>; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/delete-pages-site": { + /** + * Delete a GitHub Pages site + * @description Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + /** List GitHub Pages builds */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["page-build"])[]; + }; + }; + }; + }; + "repos/request-pages-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. + */ + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + /** Get latest Pages build */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + /** Get GitHub Pages build */ + parameters: { + path: { + build_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/create-pages-deployment": { + /** + * Create a GitHub Pages deployment + * @description Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + 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"]; + }; + }; + "repos/get-pages-health-check": { + /** + * Get a DNS health check for GitHub Pages + * @description Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + 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: never; + 404: components["responses"]["not_found"]; + /** @description There isn't a CNAME for this page */ + 422: never; + }; + }; + "projects/list-for-repo": { + /** + * 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. + */ + parameters?: { + /** @description Indicates the state of the projects to return. */ + query?: { + state?: "open" | "closed" | "all"; + }; + }; + 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"]; + }; + }; + "projects/create-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. + */ + 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"]; + }; + }; + "pulls/list": { + /** + * List pull requests + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + parameters?: { + /** @description Either `open`, `closed`, or `all` to filter by state. */ + /** @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`. */ + /** @description Filter pulls by base branch name. Example: `gh-pages`. */ + /** @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. */ + /** @description The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + query?: { + state?: "open" | "closed" | "all"; + head?: string; + base?: string; + sort?: "created" | "updated" | "popularity" | "long-running"; + direction?: "asc" | "desc"; + }; + }; + 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"]; + }; + }; + "pulls/create": { + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string; + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. */ + 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"]; + }; + }; + "pulls/list-review-comments-for-repo": { + /** + * 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. + */ + parameters?: { + /** @description The direction to sort results. Ignored without `sort` parameter. */ + query?: { + sort?: "created" | "updated" | "created_at"; + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["pull-request-review-comment"])[]; + }; + }; + }; + }; + "pulls/get-review-comment": { + /** + * Get a review comment for a pull request + * @description Provides details for a review comment. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "pulls/delete-review-comment": { + /** + * Delete a review comment for a pull request + * @description Deletes a review comment. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "pulls/update-review-comment": { + /** + * Update a review comment for a pull request + * @description Enables you to edit a review comment. + */ + 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"]; + }; + }; + }; + }; + "reactions/list-for-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/reference/pulls#review-comments). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "reactions/create-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/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + 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"]; + }; + }; + "reactions/delete-for-pull-request-comment": { + /** + * Delete a pull request comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "pulls/get": { + /** + * Get a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + 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"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/update": { + /** + * 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. + */ + 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"]; + }; + }; + "codespaces/create-with-pr-for-authenticated-user": { + /** + * Create a codespace from a pull request + * @description Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + requestBody: { + content: { + "application/json": OneOf<[{ + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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"]; + }; + }; + "pulls/list-review-comments": { + /** + * List review comments on a pull request + * @description Lists all review comments for a pull request. By default, review comments are in ascending order by ID. + */ + parameters?: { + /** @description The direction to sort results. Ignored without `sort` parameter. */ + query?: { + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["pull-request-review-comment"])[]; + }; + }; + }; + }; + "pulls/create-review-comment": { + /** + * Create a review comment for a pull request + * @description + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/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. */ + in_reply_to?: number; + }; + }; + }; + 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"]; + }; + }; + "pulls/create-reply-for-review-comment": { + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + 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"]; + }; + }; + "pulls/list-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/reference/repos#list-commits) endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["commit"])[]; + }; + }; + }; + }; + "pulls/list-files": { + /** + * List pull requests files + * @description **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. + */ + 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"]; + }; + }; + "pulls/check-if-merged": { + /** Check if a pull request has been merged */ + responses: { + /** @description Response if pull request has been merged */ + 204: never; + /** @description Not Found if pull request has not been merged */ + 404: never; + }; + }; + "pulls/merge": { + /** + * Merge a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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"]; + }; + }; + "pulls/list-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. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + "pulls/request-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. + */ + 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)[]; + } & (Record | Record); + }; + }; + 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: never; + }; + }; + "pulls/remove-requested-reviewers": { + /** Remove requested reviewers from a pull request */ + 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"]; + }; + }; + "pulls/list-reviews": { + /** + * List reviews for a pull request + * @description The list of reviews returns in chronological order. + */ + responses: { + /** @description The list of reviews returns in chronological order. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["pull-request-review"])[]; + }; + }; + }; + }; + "pulls/create-review": { + /** + * Create a review for a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * 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#submit-a-review-for-a-pull-request)." + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + 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#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: ({ + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number; + /** @description Text of the review comment. */ + body: string; + line?: number; + side?: string; + start_line?: number; + 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"]; + }; + }; + "pulls/get-review": { + /** Get a review for a pull request */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "pulls/update-review": { + /** + * Update a review for a pull request + * @description Update the review summary comment with new text. + */ + 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"]; + }; + }; + "pulls/delete-pending-review": { + /** Delete a pending review for a pull request */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + "pulls/list-comments-for-review": { + /** + * List comments for a pull request review + * @description List comments for a specific pull request review. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["review-comment"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "pulls/dismiss-review": { + /** + * Dismiss a review for a pull request + * @description **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. + */ + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** @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"]; + }; + }; + "pulls/submit-review": { + /** + * 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#create-a-review-for-a-pull-request)." + */ + 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"]; + }; + }; + "pulls/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. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + }, null]>; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-readme": { + /** + * Get a repository README + * @description Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + parameters?: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + query?: { + ref?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-readme-in-directory": { + /** + * Get a repository README for a directory + * @description Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + parameters: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + query?: { + ref?: string; + }; + /** @description The alternate path to look for a README file */ + path: { + dir: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-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/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["release"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-release": { + /** + * 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. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @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"]; + }; + }; + "repos/get-release-asset": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + /** Delete a release asset */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/update-release-asset": { + /** + * Update a release asset + * @description Users with push access to the repository can edit a release asset. + */ + requestBody?: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + state?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + }; + "repos/generate-release-notes": { + /** + * Generate release notes content for a release + * @description Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + 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"]; + }; + }; + "repos/get-latest-release": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + "repos/get-release-by-tag": { + /** + * Get a release by tag name + * @description Get a published release with the specified tag. + */ + parameters: { + /** @description tag parameter */ + path: { + tag: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-release": { + /** + * Get a release + * @description **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). + */ + responses: { + /** @description **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release": { + /** + * Delete a release + * @description Users with push access to the repository can delete a release. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/update-release": { + /** + * Update a release + * @description Users with push access to the repository can edit a release. + */ + requestBody?: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @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"]; + }; + }; + }; + }; + "repos/list-release-assets": { + /** List release assets */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["release-asset"])[]; + }; + }; + }; + }; + "repos/upload-release-asset": { + /** + * Upload a release asset + * @description This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + parameters: { + query: { + name: string; + label?: string; + }; + }; + requestBody?: { + content: { + "*/*": 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: never; + }; + }; + "reactions/list-for-release": { + /** + * List reactions for a release + * @description List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + query?: { + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "reactions/create-for-release": { + /** + * Create reaction for a release + * @description Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + 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"]; + }; + }; + "reactions/delete-for-release": { + /** + * 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/reference/repos#releases). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "secret-scanning/list-alerts-for-repo": { + /** + * List secret scanning alerts for a repository + * @description Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 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: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "secret-scanning/get-alert": { + /** + * Get a secret scanning alert + * @description Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 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: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "secret-scanning/update-alert": { + /** + * Update a secret scanning alert + * @description Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + 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: never; + /** @description Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: never; + /** @description State does not match the resolution or resolution comment */ + 422: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "secret-scanning/list-locations-for-alert": { + /** + * List locations for a secret scanning alert + * @description Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 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: never; + 503: components["responses"]["service_unavailable"]; + }; + }; + "activity/list-stargazers-for-repo": { + /** + * List stargazers + * @description Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[] | (components["schemas"]["stargazer"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/get-code-frequency-stats": { + /** + * Get the weekly commit activity + * @description Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + */ + 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"]; + }; + }; + "repos/get-commit-activity-stats": { + /** + * 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`. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["commit-activity"])[]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + "repos/get-contributors-stats": { + /** + * 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](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["contributor-activity"])[]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + "repos/get-participation-stats": { + /** + * 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. + */ + 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"]; + }; + }; + "repos/get-punch-card-stats": { + /** + * 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. + */ + 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"]; + }; + }; + "repos/create-commit-status": { + /** + * 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. + */ + parameters: { + path: { + 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?: OneOf<[string, null]>; + /** @description A short description of the status. */ + description?: OneOf<[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"]; + }; + }; + }; + }; + "activity/list-watchers-for-repo": { + /** + * List watchers + * @description Lists the people watching the specified repository. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + /** Get a repository subscription */ + 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: never; + }; + }; + "activity/set-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/reference/activity#delete-a-repository-subscription) completely. + */ + 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"]; + }; + }; + }; + }; + "activity/delete-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/reference/activity#set-a-repository-subscription). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/list-tags": { + /** List repository tags */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["tag"])[]; + }; + }; + }; + }; + "repos/list-tag-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["tag-protection"])[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/create-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. + */ + 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"]; + }; + }; + "repos/delete-tag-protection": { + /** + * 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. + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/download-tarball-archive": { + /** + * 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 + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + parameters: { + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 302: never; + }; + }; + "repos/list-teams": { + /** List repository teams */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team"])[]; + }; + }; + }; + }; + "repos/get-all-topics": { + /** Get all repository topics */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + /** Replace all repository topics */ + 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"]; + }; + }; + "repos/get-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + "repos/get-top-paths": { + /** + * Get top referral paths + * @description Get the top 10 popular contents over the last 14 days. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["content-traffic"])[]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + "repos/get-top-referrers": { + /** + * Get top referral sources + * @description Get the top 10 referrers over the last 14 days. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["referrer-traffic"])[]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + "repos/get-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + "repos/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/). + */ + 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"]; + }; + }; + }; + }; + "repos/check-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)". + */ + responses: { + /** @description Response if repository is enabled with vulnerability alerts */ + 204: never; + /** @description Not Found if repository is not enabled with vulnerability alerts */ + 404: never; + }; + }; + "repos/enable-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)". + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/disable-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)". + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "repos/download-zipball-archive": { + /** + * 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 + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + parameters: { + path: { + ref: string; + }; + }; + responses: { + /** @description Response */ + 302: never; + }; + }; + "repos/create-using-template": { + /** + * 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/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + parameters: { + path: { + template_owner: string; + 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"]["repository"]; + }; + }; + }; + }; + "repos/list-public": { + /** + * List public repositories + * @description Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + 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"]; + }; + }; + "actions/list-environment-secrets": { + /** + * List environment secrets + * @description Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["actions-secret"])[]; + }; + }; + }; + }; + }; + "actions/get-environment-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 you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + "actions/get-environment-secret": { + /** + * Get an environment secret + * @description Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + "actions/create-or-update-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). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: never; + }; + }; + "actions/delete-environment-secret": { + /** + * Delete an environment secret + * @description Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + responses: { + /** @description Default response */ + 204: never; + }; + }; + "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/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + parameters: { + /** @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/reference/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. */ + /** @description Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + q: string; + sort?: "indexed"; + }; + }; + 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": { + /** + * Search commits + * @description Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + parameters: { + /** @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/reference/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. */ + /** @description Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + q: string; + sort?: "author-date" | "committer-date"; + }; + }; + 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": { + /** + * Search issues and pull requests + * @description Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + parameters: { + /** @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/reference/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. */ + /** @description Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + q: string; + sort?: "comments" | "reactions" | "reactions-+1" | "reactions--1" | "reactions-smile" | "reactions-thinking_face" | "reactions-heart" | "reactions-tada" | "interactions" | "created" | "updated"; + }; + }; + 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": { + /** + * Search labels + * @description Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + parameters: { + /** @description The id of the repository. */ + /** @description The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + /** @description Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + repository_id: number; + q: string; + sort?: "created" | "updated"; + }; + }; + 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/repos": { + /** + * Search repositories + * @description Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + parameters: { + /** @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/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + /** @description Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + q: string; + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + }; + }; + 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": { + /** + * Search topics + * @description Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + parameters: { + /** @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/reference/search#constructing-a-search-query). */ + query: { + q: string; + }; + }; + 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": { + /** + * Search users + * @description Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, 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/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + parameters: { + /** @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/reference/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. */ + /** @description Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + query: { + q: string; + sort?: "followers" | "repositories" | "joined"; + }; + }; + 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"]; + }; + }; + "teams/get-legacy": { + /** + * 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/reference/teams#get-a-team-by-name) endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/delete-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/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "teams/update-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/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: OneOf<[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"]; + }; + }; + "teams/list-discussions-legacy": { + /** + * 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/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-discussion"])[]; + }; + }; + }; + }; + "teams/create-discussion-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/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + 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"]; + }; + }; + }; + }; + "teams/get-discussion-legacy": { + /** + * 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/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + "teams/delete-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/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/update-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/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + }; + }; + "teams/list-discussion-comments-legacy": { + /** + * 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/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-discussion-comment"])[]; + }; + }; + }; + }; + "teams/create-discussion-comment-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/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-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. + */ + 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"]; + }; + }; + }; + }; + "teams/get-discussion-comment-legacy": { + /** + * 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/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + "teams/delete-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/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/update-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/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + }; + }; + "reactions/list-for-team-discussion-comment-legacy": { + /** + * 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/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + }; + }; + "reactions/create-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/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + "reactions/list-for-team-discussion-legacy": { + /** + * 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/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + parameters?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + query?: { + content?: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["reaction"])[]; + }; + }; + }; + }; + "reactions/create-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/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + "teams/list-pending-invitations-legacy": { + /** + * 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/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["organization-invitation"])[]; + }; + }; + }; + }; + "teams/list-members-legacy": { + /** + * 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/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + parameters?: { + /** @description Filters members returned by their role in the team. */ + query?: { + role?: "member" | "maintainer" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/get-member-legacy": { + /** + * 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/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + responses: { + /** @description if user is a member */ + 204: never; + /** @description if user is not a member */ + 404: never; + }; + }; + "teams/add-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/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + responses: { + /** @description Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** @description Not Found if team synchronization is set up */ + 404: 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: never; + }; + }; + "teams/remove-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/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + responses: { + /** @description Response */ + 204: never; + /** @description Not Found if team synchronization is setup */ + 404: never; + }; + }; + "teams/get-membership-for-user-legacy": { + /** + * 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/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/add-or-update-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/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + 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: never; + 404: components["responses"]["not_found"]; + /** @description Unprocessable Entity if you attempt to add an organization to a team */ + 422: never; + }; + }; + "teams/remove-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/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + responses: { + /** @description Response */ + 204: never; + /** @description if team synchronization is set up */ + 403: never; + }; + }; + "teams/list-projects-legacy": { + /** + * 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/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["team-project"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/check-permissions-for-project-legacy": { + /** + * 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/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** @description Not Found if project is not managed by this team */ + 404: never; + }; + }; + "teams/add-or-update-project-permissions-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/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + responses: { + /** @description Response */ + 204: 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"]; + }; + }; + "teams/remove-project-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/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + responses: { + /** @description Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "teams/list-repos-legacy": { + /** + * 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/reference/teams#list-team-repositories) endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "teams/check-permissions-for-repo-legacy": { + /** + * 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/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + 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: never; + /** @description Not Found if repository is not managed by this team */ + 404: never; + }; + }; + "teams/add-or-update-repo-permissions-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/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 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: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "teams/remove-repo-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/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "teams/list-child-legacy": { + /** + * 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/reference/teams#list-child-teams) endpoint. + */ + 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"]; + }; + }; + "users/get-authenticated": { + /** + * Get the authenticated user + * @description If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + 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"]; + }; + }; + "users/update-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. + */ + requestBody?: { + content: { + "application/json": { + /** @description The new name of the user. */ + name?: string; + /** @description The publicly visible email address of the user. */ + email?: string; + /** @description The new blog URL of the user. */ + blog?: string; + /** @description The new Twitter username of the user. */ + twitter_username?: OneOf<[string, null]>; + /** @description The new company of the user. */ + company?: string; + /** @description The new location of the user. */ + 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"]; + }; + }; + "users/list-blocked-by-authenticated-user": { + /** + * List users blocked by the authenticated user + * @description List the users you've blocked on your personal account. + */ + 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"]; + }; + }; + "users/check-blocked": { + /** Check if a user is blocked by the authenticated user */ + responses: { + /** @description If the user is blocked */ + 204: 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"]; + }; + }; + }; + }; + "users/block": { + /** Block a user */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + /** Unblock a user */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codespaces/list-for-authenticated-user": { + /** + * List codespaces for the authenticated user + * @description Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/create-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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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 Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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 Location for this codespace. Assigned by IP if not provided */ + location?: 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 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"]; + }; + }; + "codespaces/list-secrets-for-authenticated-user": { + /** + * List secrets for the authenticated user + * @description Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: (components["schemas"]["codespaces-secret"])[]; + }; + }; + }; + }; + }; + "codespaces/get-public-key-for-authenticated-user": { + /** + * 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. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + "codespaces/get-secret-for-authenticated-user": { + /** + * Get a secret for the authenticated user + * @description Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + "codespaces/create-or-update-secret-for-authenticated-user": { + /** + * Create or update a secret for the authenticated user + * @description Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### 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) + * ``` + */ + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: (string)[]; + }; + }; + }; + responses: { + /** @description Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "codespaces/delete-secret-for-authenticated-user": { + /** + * Delete a secret for the authenticated user + * @description Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "codespaces/list-repositories-for-secret-for-authenticated-user": { + /** + * List selected repositories for a user secret + * @description List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/set-repositories-for-secret-for-authenticated-user": { + /** + * Set selected repositories for a user secret + * @description Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; + }; + }; + responses: { + /** @description No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + "codespaces/add-repository-for-secret-for-authenticated-user": { + /** + * Add a selected repository to a user secret + * @description Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + "codespaces/remove-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 codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + parameters: { + path: { + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + "codespaces/get-for-authenticated-user": { + /** + * Get a codespace for the authenticated user + * @description Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/delete-for-authenticated-user": { + /** + * Delete a codespace for the authenticated user + * @description Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/update-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. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/export-for-authenticated-user": { + /** + * 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. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/get-export-details-for-authenticated-user": { + /** + * Get details about a codespace export + * @description Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "codespaces/codespace-machines-for-authenticated-user": { + /** + * List machine types for a codespace + * @description List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/start-for-authenticated-user": { + /** + * Start a codespace for the authenticated user + * @description Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "codespaces/stop-for-authenticated-user": { + /** + * Stop a codespace for the authenticated user + * @description Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + 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"]; + }; + }; + "users/set-primary-email-visibility-for-authenticated-user": { + /** + * Set primary email visibility for the authenticated user + * @description Sets the visibility for your primary email addresses. + */ + 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"]; + }; + }; + "users/list-emails-for-authenticated-user": { + /** + * List email addresses for the authenticated user + * @description Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + 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"]; + }; + }; + "users/add-email-for-authenticated-user": { + /** + * Add an email address for the authenticated user + * @description This endpoint is accessible with the `user` scope. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @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. */ + emails: (string)[]; + }, (string)[], 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"]; + }; + }; + "users/delete-email-for-authenticated-user": { + /** + * Delete an email address for the authenticated user + * @description This endpoint is accessible with the `user` scope. + */ + requestBody?: { + content: { + "application/json": OneOf<[{ + /** @description Email addresses associated with the GitHub user account. */ + emails: (string)[]; + }, (string)[], string]>; + }; + }; + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/list-followers-for-authenticated-user": { + /** + * List followers of the authenticated user + * @description Lists the people following the authenticated user. + */ + 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"]; + }; + }; + "users/list-followed-by-authenticated-user": { + /** + * List the people the authenticated user follows + * @description Lists the people who the authenticated user follows. + */ + 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"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + /** Check if a person is followed by the authenticated user */ + responses: { + /** @description if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** @description if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/follow": { + /** + * Follow a user + * @description Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/unfollow": { + /** + * Unfollow a user + * @description Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/list-gpg-keys-for-authenticated-user": { + /** + * List GPG keys for the authenticated user + * @description Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + "users/create-gpg-key-for-authenticated-user": { + /** + * Create a GPG key for the authenticated user + * @description Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + "users/get-gpg-key-for-authenticated-user": { + /** + * Get a GPG key for the authenticated user + * @description View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + "users/delete-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. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/list-installations-for-authenticated-user": { + /** + * List app installations accessible to the user access token + * @description Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + 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"]; + }; + }; + "apps/list-installation-repos-for-authenticated-user": { + /** + * List repositories accessible to the user access token + * @description List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + 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"]; + }; + }; + "apps/add-repo-to-installation-for-authenticated-user": { + /** + * Add a repository to an app installation + * @description Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "apps/remove-repo-from-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. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "interactions/get-restrictions-for-authenticated-user": { + /** + * 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. + */ + responses: { + /** @description Default response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"] | Record; + }; + }; + /** @description Response when there are no restrictions */ + 204: never; + }; + }; + "interactions/set-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. + */ + 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"]; + }; + }; + "interactions/remove-restrictions-for-authenticated-user": { + /** + * Remove interaction restrictions from your public repositories + * @description Removes any interaction restrictions from your public repositories. + */ + responses: { + /** @description Response */ + 204: never; + }; + }; + "issues/list-for-authenticated-user": { + /** + * 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/reference/pulls#list-pull-requests)" endpoint. + */ + parameters?: { + /** @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. */ + /** @description Indicates the state of the issues to return. */ + /** @description What to sort results by. */ + query?: { + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "repos" | "all"; + state?: "open" | "closed" | "all"; + sort?: "created" | "updated" | "comments"; + }; + }; + 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"]; + }; + }; + "users/list-public-ssh-keys-for-authenticated-user": { + /** + * List public SSH keys for the authenticated user + * @description Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + "users/create-public-ssh-key-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. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + 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"]; + }; + }; + "users/get-public-ssh-key-for-authenticated-user": { + /** + * Get a public SSH key for the authenticated user + * @description View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 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"]; + }; + }; + "users/delete-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. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "apps/list-subscriptions-for-authenticated-user": { + /** + * List subscriptions for the authenticated user + * @description Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + 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"]; + }; + }; + "apps/list-subscriptions-for-authenticated-user-stubbed": { + /** + * List subscriptions for the authenticated user (stubbed) + * @description Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + 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"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + /** List organization memberships for the authenticated user */ + parameters?: { + /** @description Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + query?: { + state?: "active" | "pending"; + }; + }; + 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"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + /** Get an organization membership for the authenticated user */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + /** Update an organization membership for the authenticated user */ + 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"]; + }; + }; + "migrations/list-for-authenticated-user": { + /** + * List user migrations + * @description Lists all migrations a user has started. + */ + 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"]; + }; + }; + "migrations/start-for-authenticated-user": { + /** + * Start a user migration + * @description Initiates the generation of a user migration archive. + */ + requestBody: { + content: { + "application/json": { + /** @description Lock the repositories being migrated at the start of the migration */ + lock_repositories?: boolean; + /** @description Indicates whether metadata should be excluded and only git source should be included for the migration. */ + exclude_metadata?: boolean; + /** @description Indicates whether the repository git data should be excluded from the migration. */ + exclude_git_data?: boolean; + /** @description Do not include attachments in the migration */ + exclude_attachments?: boolean; + /** @description Do not include releases in the migration */ + exclude_releases?: boolean; + /** @description Indicates whether projects owned by the organization or users should be excluded. */ + 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 + */ + org_metadata_only?: boolean; + /** @description Exclude attributes from the API response to improve performance */ + 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"]; + }; + }; + "migrations/get-status-for-authenticated-user": { + /** + * Get a user migration status + * @description Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + parameters?: { + query?: { + exclude?: (string)[]; + }; + }; + 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"]; + }; + }; + "migrations/get-archive-for-authenticated-user": { + /** + * 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. + */ + responses: { + /** @description Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "migrations/delete-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/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/unlock-repo-for-authenticated-user": { + /** + * Unlock a user repository + * @description Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "migrations/list-repos-for-authenticated-user": { + /** + * List repositories for a user migration + * @description Lists all the repositories for this user migration. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-for-authenticated-user": { + /** + * List organizations for the authenticated user + * @description List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + 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"]; + }; + }; + "packages/list-packages-for-authenticated-user": { + /** + * List packages for the authenticated user's namespace + * @description Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters: { + /** @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. */ + query: { + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["package"])[]; + }; + }; + }; + }; + "packages/get-package-for-authenticated-user": { + /** + * Get a package for the authenticated user + * @description Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + "packages/delete-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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-for-authenticated-user": { + /** + * Restore a package for the authenticated user + * @description Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters?: { + /** @description package token */ + query?: { + token?: string; + }; + }; + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + /** + * List package versions for a package owned by the authenticated user + * @description Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters?: { + /** @description The state of the package, either active or deleted. */ + query?: { + state?: "active" | "deleted"; + }; + }; + 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"]; + }; + }; + "packages/get-package-version-for-authenticated-user": { + /** + * Get a package version for the authenticated user + * @description Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + "packages/delete-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. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-version-for-authenticated-user": { + /** + * Restore a package version for the authenticated user + * @description Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/create-for-authenticated-user": { + /** + * 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. + */ + requestBody: { + content: { + "application/json": { + /** @description Name of the project */ + name: string; + /** @description Body of the project */ + body?: OneOf<[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"]; + }; + }; + "users/list-public-emails-for-authenticated-user": { + /** + * List public email addresses for the authenticated user + * @description Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + */ + 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"]; + }; + }; + "repos/list-for-authenticated-user": { + /** + * 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. + */ + parameters?: { + /** @description Limit results to repositories with the specified visibility. */ + /** + * @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. + */ + /** @description Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + /** @description The property to sort the results by. */ + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + query?: { + visibility?: "all" | "public" | "private"; + affiliation?: string; + type?: "all" | "owner" | "public" | "private" | "member"; + sort?: "created" | "updated" | "pushed" | "full_name"; + direction?: "asc" | "desc"; + }; + }; + 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"]; + }; + }; + "repos/create-for-authenticated-user": { + /** + * Create a repository for the authenticated user + * @description Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + 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 Whether issues are enabled. + * @default true + */ + has_issues?: 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; + /** @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. */ + gitignore_template?: string; + /** @description The license keyword of the open source license for this repository. */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: 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 Auto-merge to be used on pull requests. + * @default false + */ + allow_auto_merge?: 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 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 + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + */ + is_template?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-invitations-for-authenticated-user": { + /** + * 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. + */ + 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"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + /** Decline a repository invitation */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + /** Accept a repository invitation */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "users/list-ssh-signing-keys-for-authenticated-user": { + /** + * List SSH signing keys for the authenticated user + * @description Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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"]; + }; + }; + "users/create-ssh-signing-key-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. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + 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"]; + }; + }; + "users/get-ssh-signing-key-for-authenticated-user": { + /** + * Get an SSH signing key for the authenticated user + * @description Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + 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"]; + }; + }; + "users/delete-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. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/list-repos-starred-by-authenticated-user": { + /** + * List repositories starred by the authenticated user + * @description Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + 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"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + /** Check if a repository is starred by the authenticated user */ + responses: { + /** @description Response if this repository is starred by you */ + 204: 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"]; + }; + }; + }; + }; + "activity/star-repo-for-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 verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + /** Unstar a repository for the authenticated user */ + responses: { + /** @description Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/list-watched-repos-for-authenticated-user": { + /** + * List repositories watched by the authenticated user + * @description Lists repositories the authenticated user is watching. + */ + 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"]; + }; + }; + "teams/list-for-authenticated-user": { + /** + * List teams for the authenticated user + * @description List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). + */ + 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"]; + }; + }; + "users/list": { + /** + * 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/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "users/get-by-username": { + /** + * Get a user + * @description Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "activity/list-events-for-authenticated-user": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "activity/list-org-events-for-authenticated-user": { + /** + * 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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + /** List public events for a user */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "users/list-followers-for-user": { + /** + * List followers of a user + * @description Lists the people following the specified user. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "users/list-following-for-user": { + /** + * List the people a user follows + * @description Lists the people who the specified user follows. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["simple-user"])[]; + }; + }; + }; + }; + "users/check-following-for-user": { + /** Check if a user follows another user */ + parameters: { + path: { + target_user: string; + }; + }; + responses: { + /** @description if the user follows the target user */ + 204: never; + /** @description if the user does not follow the target user */ + 404: never; + }; + }; + "gists/list-for-user": { + /** + * List gists for a user + * @description Lists public gists for the specified user: + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["base-gist"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/list-gpg-keys-for-user": { + /** + * List GPG keys for a user + * @description Lists the GPG keys for a user. This information is accessible by anyone. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["gpg-key"])[]; + }; + }; + }; + }; + "users/get-context-for-user": { + /** + * Get contextual information for a user + * @description Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + parameters?: { + /** @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`. */ + /** @description Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ + query?: { + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + subject_id?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "apps/get-user-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. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + "users/list-public-keys-for-user": { + /** + * List public keys for a user + * @description Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["key-simple"])[]; + }; + }; + }; + }; + "orgs/list-for-user": { + /** + * 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/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["organization-simple"])[]; + }; + }; + }; + }; + "packages/list-packages-for-user": { + /** + * List packages for a user + * @description Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + parameters: { + /** @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. */ + query: { + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["package"])[]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "packages/get-package-for-user": { + /** + * Get a package for a user + * @description Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + "packages/delete-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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-for-user": { + /** + * Restore a package for a user + * @description Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + parameters?: { + /** @description package token */ + query?: { + token?: string; + }; + }; + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/get-all-package-versions-for-package-owned-by-user": { + /** + * List package versions for a package owned by a user + * @description Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 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"]; + }; + }; + "packages/get-package-version-for-user": { + /** + * Get a package version for a user + * @description Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + "packages/delete-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. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "packages/restore-package-version-for-user": { + /** + * Restore package version for a user + * @description Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + responses: { + /** @description Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + /** List user projects */ + parameters?: { + /** @description Indicates the state of the projects to return. */ + query?: { + state?: "open" | "closed" | "all"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["project"])[]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "activity/list-received-events-for-user": { + /** + * List events received by the authenticated user + * @description These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + /** List public events received by a user */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": (components["schemas"]["event"])[]; + }; + }; + }; + }; + "repos/list-for-user": { + /** + * List repositories for a user + * @description Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. + */ + parameters?: { + /** @description Limit results to repositories of the specified type. */ + /** @description The property to sort the results by. */ + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + query?: { + type?: "all" | "owner" | "member"; + sort?: "created" | "updated" | "pushed" | "full_name"; + direction?: "asc" | "desc"; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + "billing/get-github-actions-billing-user": { + /** + * Get GitHub Actions billing for a user + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + "billing/get-github-packages-billing-user": { + /** + * Get GitHub Packages billing for a user + * @description Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + "billing/get-shared-storage-billing-user": { + /** + * Get shared storage billing for a user + * @description Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + "users/list-ssh-signing-keys-for-user": { + /** + * List SSH signing keys for a user + * @description Lists the SSH signing keys for a user. This operation is accessible by anyone. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["ssh-signing-key"])[]; + }; + }; + }; + }; + "activity/list-repos-starred-by-user": { + /** + * List repositories starred by a user + * @description Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["starred-repository"])[] | (components["schemas"]["repository"])[]; + }; + }; + }; + }; + "activity/list-repos-watched-by-user": { + /** + * List repositories watched by a user + * @description Lists repositories a user is watching. + */ + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": (components["schemas"]["minimal-repository"])[]; + }; + }; + }; + }; + "meta/get-zen": { + /** + * Get the Zen of GitHub + * @description Get a random sentence from the Zen of GitHub + */ + responses: { + /** @description Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; +} diff --git a/examples/github-api.ts b/examples/github-api.ts index eaf42e766..752675ef2 100644 --- a/examples/github-api.ts +++ b/examples/github-api.ts @@ -861,7 +861,7 @@ export interface paths { * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ get: operations["orgs/list-custom-roles"]; }; @@ -1543,7 +1543,7 @@ export interface paths { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ post: operations["orgs/create-custom-role"]; }; @@ -1557,7 +1557,7 @@ export interface paths { * To use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ get: operations["orgs/get-custom-role"]; /** @@ -1570,7 +1570,7 @@ export interface paths { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ delete: operations["orgs/delete-custom-role"]; /** @@ -1582,7 +1582,7 @@ export interface paths { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ patch: operations["orgs/update-custom-role"]; }; @@ -3520,10 +3520,6 @@ export interface paths { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ put: operations["repos/set-app-access-restrictions"]; /** @@ -3531,10 +3527,6 @@ export interface paths { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ post: operations["repos/add-app-access-restrictions"]; /** @@ -3542,10 +3534,6 @@ export interface paths { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ delete: operations["repos/remove-app-access-restrictions"]; }; @@ -8909,6 +8897,12 @@ export interface components { * @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 @@ -9644,7 +9638,7 @@ export interface components { * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ - "code-scanning-alert-dismissed-reason": "" | "false positive" | "won't fix" | "used in tests"; + "code-scanning-alert-dismissed-reason": "" | "false positive" | "won't fix" | "used in tests" | null; /** @description The dismissal comment associated with the dismissal of the alert. */ "code-scanning-alert-dismissed-comment": string; "code-scanning-alert-rule": { @@ -9656,12 +9650,12 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity?: "none" | "note" | "warning" | "error"; + severity?: "none" | "note" | "warning" | "error" | null; /** * @description The security severity of the alert. * @enum {string|null} */ - security_severity_level?: "low" | "medium" | "high" | "critical"; + 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. */ @@ -9703,7 +9697,7 @@ export interface components { * @description A classification of the file. For example to identify it as generated. * @enum {string|null} */ - "code-scanning-alert-classification": "source" | "generated" | "test" | "library"; + "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"]; @@ -10086,7 +10080,7 @@ export interface components { * @description The execution scope of the vulnerable dependency. * @enum {string|null} */ - readonly scope?: "development" | "runtime"; + readonly scope?: "development" | "runtime" | null; }; security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; @@ -10100,7 +10094,7 @@ export interface components { * @description The reason that the alert was dismissed. * @enum {string|null} */ - dismissed_reason: "fix_started" | "inaccurate" | "no_bandwidth" | "not_used" | "tolerable_risk"; + 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; fixed_at: components["schemas"]["alert-fixed-at"]; @@ -10120,7 +10114,7 @@ export interface components { * @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"; + "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"]; @@ -10403,7 +10397,7 @@ export interface components { * @example not_planned * @enum {string|null} */ - state_reason?: "completed" | "reopened" | "not_planned"; + state_reason?: "completed" | "reopened" | "not_planned" | null; /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -10576,6 +10570,16 @@ export interface components { 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"]; @@ -10585,6 +10589,8 @@ export interface components { current_user_actor?: components["schemas"]["link-with-type"]; current_user_organization?: components["schemas"]["link-with-type"]; current_user_organizations?: (components["schemas"]["link-with-type"])[]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; }; }; /** @@ -11298,6 +11304,7 @@ export interface components { has_wiki?: boolean; has_pages?: boolean; has_downloads?: boolean; + has_discussions?: boolean; archived?: boolean; disabled?: boolean; visibility?: string; @@ -11760,7 +11767,7 @@ export interface components { * @example ready * @enum {string|null} */ - prebuild_availability: "none" | "ready" | "in_progress"; + prebuild_availability: "none" | "ready" | "in_progress" | null; }) | null; /** * Codespace @@ -12447,6 +12454,7 @@ export interface components { has_wiki?: boolean; has_pages?: boolean; has_downloads?: boolean; + has_discussions?: boolean; archived?: boolean; disabled?: boolean; visibility?: string; @@ -13403,6 +13411,12 @@ export interface components { * @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 @@ -14333,6 +14347,8 @@ export interface components { 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; @@ -14563,7 +14579,7 @@ export interface components { * @example success * @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null; /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -15742,7 +15758,7 @@ export interface components { * @example neutral * @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null; /** * Format: date-time * @example 2018-05-04T01:14:52Z @@ -15837,12 +15853,12 @@ export interface components { * @example completed * @enum {string|null} */ - status: "queued" | "in_progress" | "completed"; + status: "queued" | "in_progress" | "completed" | null; /** * @example neutral * @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required"; + 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; /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ @@ -15886,7 +15902,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity?: "none" | "note" | "warning" | "error"; + severity?: "none" | "note" | "warning" | "error" | null; /** @description A short description of the rule used to detect the alert. */ description?: string; }; @@ -16131,7 +16147,7 @@ export interface components { * @example ready * @enum {string|null} */ - prebuild_availability: "none" | "ready" | "in_progress"; + prebuild_availability: "none" | "ready" | "in_progress" | null; }; /** * Codespaces Secret @@ -16973,7 +16989,7 @@ export interface components { * @description The execution scope of the vulnerable dependency. * @enum {string|null} */ - readonly scope?: "development" | "runtime"; + readonly scope?: "development" | "runtime" | null; }; security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; @@ -16987,7 +17003,7 @@ export interface components { * @description The reason that the alert was dismissed. * @enum {string|null} */ - dismissed_reason: "fix_started" | "inaccurate" | "no_bandwidth" | "not_used" | "tolerable_risk"; + 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; fixed_at: components["schemas"]["alert-fixed-at"]; @@ -17755,7 +17771,7 @@ export interface components { * @example not_planned * @enum {string|null} */ - state_reason?: "completed" | "reopened" | "not_planned"; + state_reason?: "completed" | "reopened" | "not_planned" | null; /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -18568,7 +18584,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side?: "LEFT" | "RIGHT"; + 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 @@ -18835,7 +18851,7 @@ export interface components { * @example built * @enum {string|null} */ - status: "built" | "building" | "errored"; + status: "built" | "building" | "errored" | null; /** * @description The Pages site's custom domain * @example example.com @@ -18846,7 +18862,7 @@ export interface components { * @example pending * @enum {string|null} */ - protected_domain_state?: "pending" | "verified" | "unverified"; + protected_domain_state?: "pending" | "verified" | "unverified" | null; /** * Format: date-time * @description The timestamp when a pending domain becomes unverified. @@ -18869,7 +18885,7 @@ export interface components { * @example legacy * @enum {string|null} */ - build_type?: "legacy" | "workflow"; + 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. @@ -19223,6 +19239,7 @@ export interface components { has_projects: boolean; has_wiki: boolean; has_pages: boolean; + has_discussions: boolean; /** Format: uri */ homepage: string; language: string; @@ -19405,6 +19422,7 @@ export interface components { has_projects: boolean; has_wiki: boolean; has_pages: boolean; + has_discussions: boolean; /** Format: uri */ homepage: string; language: string; @@ -19658,7 +19676,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side?: "LEFT" | "RIGHT"; + 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 @@ -20325,6 +20343,7 @@ export interface components { has_pages: boolean; has_wiki: boolean; has_downloads: boolean; + has_discussions?: boolean; archived: boolean; /** @description Returns whether or not this repository disabled. */ disabled: boolean; @@ -20869,7 +20888,7 @@ export interface components { * @example neutral * @enum {string|null} */ - conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "stale" | "startup_failure"; + conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | "stale" | "startup_failure" | null; /** Format: date-time */ created_at?: string; /** @example master */ @@ -20911,7 +20930,7 @@ export interface components { * @example neutral * @enum {string|null} */ - conclusion: "waiting" | "pending" | "startup_failure" | "stale" | "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required"; + 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; @@ -21359,7 +21378,7 @@ export interface components { * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. * @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | "startup_failure"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | "startup_failure" | null; /** Format: date-time */ created_at: string; /** @description The head branch name the changes are on. */ @@ -21437,7 +21456,7 @@ export interface components { * @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" | "" | "pending"; + status: "requested" | "in_progress" | "completed" | "queued" | "" | "pending" | null; /** Format: date-time */ updated_at: string; /** @@ -21509,7 +21528,7 @@ export interface components { * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. * @enum {string|null} */ - dismissed_reason: "false positive" | "won't fix" | "used in tests" | ""; + dismissed_reason: "false positive" | "won't fix" | "used in tests" | "" | null; /** * Format: uri * @description The GitHub URL of the alert resource. @@ -21577,7 +21596,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; }; /** * @description State of a code scanning alert. @@ -21660,7 +21679,7 @@ export interface components { * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. * @enum {string|null} */ - dismissed_reason: "false positive" | "won't fix" | "used in tests" | ""; + dismissed_reason: "false positive" | "won't fix" | "used in tests" | "" | null; /** * Format: uri * @description The GitHub URL of the alert resource. @@ -21736,7 +21755,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; tags?: (string)[]; }; /** @@ -21858,7 +21877,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; tags?: (string)[]; }; /** @@ -21944,7 +21963,7 @@ export interface components { * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. * @enum {string|null} */ - dismissed_reason: "false positive" | "won't fix" | "used in tests" | ""; + dismissed_reason: "false positive" | "won't fix" | "used in tests" | "" | null; /** * Format: uri * @description The GitHub URL of the alert resource. @@ -22022,7 +22041,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; tags?: (string)[]; }; /** @@ -22141,7 +22160,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; tags?: (string)[]; }; /** @@ -22255,7 +22274,7 @@ export interface components { * @description The severity of the alert. * @enum {string|null} */ - severity: "none" | "note" | "warning" | "error" | ""; + severity: "none" | "note" | "warning" | "error" | "" | null; }; /** * @description State of a code scanning alert. @@ -22781,7 +22800,7 @@ export interface components { check_suite_node_id: string; check_suite_url?: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | ""; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | null; /** Format: date-time */ created_at: string; display_title: string; @@ -23028,7 +23047,7 @@ export interface components { * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. * @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "skipped" | ""; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "skipped" | "" | null; /** Format: uri */ details_url: string; external_id: string; @@ -23510,7 +23529,7 @@ export interface components { check_suite_node_id: string; check_suite_url?: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "startup_failure"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "startup_failure" | null; /** Format: date-time */ created_at: string; display_title: string; @@ -26069,6 +26088,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -27926,7 +27950,7 @@ export interface components { /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -28536,7 +28560,7 @@ export interface components { /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -29153,7 +29177,7 @@ export interface components { /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -29724,7 +29748,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -30143,7 +30167,7 @@ export interface components { /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -30621,7 +30645,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -31036,7 +31060,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -31665,7 +31689,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -32100,7 +32124,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -32531,7 +32555,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -32935,7 +32959,7 @@ export interface components { }) | null; }) & ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; assignee?: Record | null; assignees?: (Record | null)[]; author_association?: string; @@ -33006,7 +33030,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -33623,7 +33647,7 @@ export interface components { */ old_issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -34266,7 +34290,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -34744,7 +34768,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -35159,7 +35183,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -35636,7 +35660,7 @@ export interface components { */ new_issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -36146,6 +36170,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -36285,7 +36314,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -36744,7 +36773,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -37163,7 +37192,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -37594,7 +37623,7 @@ export interface components { installation?: components["schemas"]["simple-installation"]; issue: ({ /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -38072,7 +38101,7 @@ export interface components { */ issue: { /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee?: ({ /** Format: uri */ @@ -42091,7 +42120,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -42334,6 +42363,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -42669,6 +42703,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -43269,7 +43308,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -43501,6 +43540,11 @@ export interface components { * @default true */ has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; has_pages: boolean; /** * @description Whether projects are enabled. @@ -43847,6 +43891,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -44448,7 +44497,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -44691,6 +44740,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -45026,6 +45080,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -45627,7 +45686,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -47165,7 +47224,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -48715,7 +48774,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -48958,6 +49017,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -49293,6 +49357,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -49913,7 +49982,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -50156,6 +50225,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -50491,6 +50565,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -51108,7 +51187,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -51351,6 +51430,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -51686,6 +51770,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -52287,7 +52376,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -52530,6 +52619,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -52865,6 +52959,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -53466,7 +53565,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -53709,6 +53808,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -54044,6 +54148,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -54644,7 +54753,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -56167,7 +56276,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -57716,7 +57825,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -59302,7 +59411,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side: "LEFT" | "RIGHT" | ""; + start_side: "LEFT" | "RIGHT" | "" | null; /** Format: date-time */ updated_at: string; /** @@ -59395,7 +59504,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -59637,6 +59746,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -59965,6 +60079,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -60559,7 +60678,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side: "LEFT" | "RIGHT" | ""; + start_side: "LEFT" | "RIGHT" | "" | null; /** Format: date-time */ updated_at: string; /** @@ -60652,7 +60771,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -60894,6 +61013,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -61222,6 +61346,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -61823,7 +61952,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side: "LEFT" | "RIGHT" | ""; + start_side: "LEFT" | "RIGHT" | "" | null; /** Format: date-time */ updated_at: string; /** @@ -61916,7 +62045,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -62158,6 +62287,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -62486,6 +62620,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -63034,7 +63173,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -63276,6 +63415,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -63604,6 +63748,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -64231,7 +64380,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -65341,7 +65490,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -65584,6 +65733,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -65912,6 +66066,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -66548,7 +66707,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -66791,6 +66950,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -67126,6 +67290,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -67782,7 +67951,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -68025,6 +68194,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -68360,6 +68534,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -68996,7 +69175,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -69239,6 +69418,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -69574,6 +69758,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -70228,7 +70417,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -70470,6 +70659,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -70798,6 +70992,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -71418,7 +71617,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -71660,6 +71859,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -71949,6 +72153,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -72496,7 +72705,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side: "LEFT" | "RIGHT" | ""; + start_side: "LEFT" | "RIGHT" | "" | null; /** Format: date-time */ updated_at: string; /** @@ -72597,7 +72806,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; /** User */ assignee: ({ /** Format: uri */ @@ -72839,6 +73048,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -73128,6 +73342,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -73675,7 +73894,7 @@ export interface components { * @default RIGHT * @enum {string|null} */ - start_side: "LEFT" | "RIGHT" | ""; + start_side: "LEFT" | "RIGHT" | "" | null; /** Format: date-time */ updated_at: string; /** @@ -73780,7 +73999,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -74023,6 +74242,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -74358,6 +74582,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -74989,7 +75218,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -75232,6 +75461,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -75567,6 +75801,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -76184,7 +76423,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -76427,6 +76666,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -76762,6 +77006,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -77356,7 +77605,7 @@ export interface components { }; }; /** @enum {string|null} */ - active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | ""; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | "" | null; additions?: number; /** User */ assignee: ({ @@ -77599,6 +77848,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -77934,6 +78188,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -78723,6 +78982,11 @@ export interface components { * @default true */ has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; homepage: string; /** Format: uri */ hooks_url: string; @@ -81030,7 +81294,7 @@ export interface components { * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ - resolution?: "" | "false_positive" | "wont_fix" | "revoked" | "used_in_tests" | "pattern_deleted" | "pattern_edited"; + resolution?: "" | "false_positive" | "wont_fix" | "revoked" | "used_in_tests" | "pattern_deleted" | "pattern_edited" | null; /** * Format: date-time * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. @@ -83927,7 +84191,7 @@ export interface components { check_run_url: string; completed_at: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "" | "skipped" | "cancelled" | "action_required" | "neutral" | "timed_out"; + conclusion: "success" | "failure" | "" | "skipped" | "cancelled" | "action_required" | "neutral" | "timed_out" | null; head_sha: string; /** Format: uri */ html_url: string; @@ -83957,7 +84221,7 @@ export interface components { steps: ({ completed_at: string; /** @enum {string|null} */ - conclusion: "failure" | "skipped" | "success" | "cancelled" | ""; + conclusion: "failure" | "skipped" | "success" | "cancelled" | "" | null; name: string; number: number; started_at: string; @@ -84004,7 +84268,7 @@ export interface components { check_run_url: string; completed_at: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "" | "cancelled" | "neutral"; + conclusion: "success" | "failure" | "" | "cancelled" | "neutral" | null; head_sha: string; /** Format: uri */ html_url: string; @@ -84034,7 +84298,7 @@ export interface components { steps: ({ completed_at: string; /** @enum {string|null} */ - conclusion: "failure" | "skipped" | "success" | "" | "cancelled"; + conclusion: "failure" | "skipped" | "success" | "" | "cancelled" | null; name: string; number: number; started_at: string; @@ -84111,7 +84375,7 @@ export interface components { steps: ({ completed_at: string; /** @enum {string|null} */ - conclusion: "failure" | "skipped" | "success" | "cancelled" | ""; + conclusion: "failure" | "skipped" | "success" | "cancelled" | "" | null; name: string; number: number; started_at: string; @@ -84196,7 +84460,7 @@ export interface components { /** Format: uri */ check_suite_url: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | null; /** Format: date-time */ created_at: string; event: string; @@ -84883,7 +85147,7 @@ export interface components { /** Format: uri */ check_suite_url: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "skipped" | ""; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "skipped" | "" | null; /** Format: date-time */ created_at: string; event: string; @@ -85298,7 +85562,7 @@ export interface components { check_suite_node_id?: string; check_suite_url?: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "skipped" | "stale"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "skipped" | "stale" | null; created_at?: string; event?: string; head_branch?: string; @@ -85571,7 +85835,7 @@ export interface components { /** Format: uri */ check_suite_url: string; /** @enum {string|null} */ - conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | "startup_failure"; + conclusion: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "stale" | "" | "skipped" | "startup_failure" | null; /** Format: date-time */ created_at: string; event: string; @@ -86400,7 +86664,10 @@ export interface components { pathItems: never; } +export type external = Record; + export interface operations { + "meta/root": { /** * GitHub API Root @@ -86482,11 +86749,13 @@ export interface operations { * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ requestBody: { - "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"]; + 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: { @@ -86609,17 +86878,19 @@ export interface operations { * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ requestBody?: { - "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"]; + 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: { @@ -86668,9 +86939,11 @@ export interface operations { * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). */ requestBody: { - "application/json": { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string; + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; }; }; responses: { @@ -86685,9 +86958,11 @@ export interface operations { * @description OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ requestBody: { - "application/json": { - /** @description The access_token of the OAuth application. */ - access_token: string; + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; }; }; responses: { @@ -86707,9 +86982,11 @@ export interface operations { * @description OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ requestBody: { - "application/json": { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string; + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; }; }; responses: { @@ -86724,9 +87001,11 @@ export interface operations { * @description OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ requestBody: { - "application/json": { - /** @description The access_token of the OAuth application. */ - access_token: string; + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; }; }; responses: { @@ -86745,32 +87024,34 @@ export interface operations { * @description Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ requestBody: { - "application/json": { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string; - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string; - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number; - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: (string)[]; - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - repository_ids?: (number)[]; - permissions?: components["schemas"]["app-permissions"]; + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: (string)[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: (number)[]; + permissions?: components["schemas"]["app-permissions"]; + }; }; }; responses: { @@ -86924,9 +87205,11 @@ export interface operations { * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - enabled_organizations: components["schemas"]["enabled-organizations"]; - allowed_actions?: components["schemas"]["allowed-actions"]; + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; }; }; responses: { @@ -86961,9 +87244,11 @@ export interface operations { * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: (number)[]; + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: (number)[]; + }; }; }; responses: { @@ -87019,7 +87304,9 @@ export interface operations { * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": components["schemas"]["selected-actions"]; + content: { + "application/json": components["schemas"]["selected-actions"]; + }; }; responses: { /** @description Response */ @@ -87056,7 +87343,9 @@ export interface operations { * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ requestBody: { - "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; }; responses: { /** @description Success response */ @@ -87090,30 +87379,32 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description Name of the runner group. */ - name: string; - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. - * @enum {string} - */ - visibility?: "selected" | "all"; - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: (number)[]; - /** @description List of runner IDs to add to the runner group. */ - runners?: (number)[]; - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean; - /** - * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. - * @default false - */ - restricted_to_workflows?: boolean; - /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ - selected_workflows?: (string)[]; + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: (number)[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: (number)[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; }; }; responses: { @@ -87161,27 +87452,29 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody?: { - "application/json": { - /** @description Name of the runner group. */ - name?: string; - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. - * @default all - * @enum {string} - */ - visibility?: "selected" | "all"; - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean; - /** - * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. - * @default false - */ - restricted_to_workflows?: boolean; - /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ - selected_workflows?: (string)[]; + content: { + "application/json": { + /** @description Name of the runner group. */ + name?: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; }; }; responses: { @@ -87220,9 +87513,11 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: (number)[]; + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: (number)[]; + }; }; }; responses: { @@ -87284,9 +87579,11 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description List of runner IDs to add to the runner group. */ - runners: (number)[]; + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: (number)[]; + }; }; }; responses: { @@ -87455,9 +87752,11 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody: { - "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)[]; + 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: { @@ -87474,9 +87773,11 @@ export interface operations { * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description The names of the custom labels to add to the runner. */ - labels: (string)[]; + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: (string)[]; + }; }; }; responses: { @@ -87674,27 +87975,29 @@ export interface operations { * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ requestBody: { - "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; - } | undefined; + 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; + } | undefined; + }; + public?: boolean | ("true" | "false"); }; - public?: boolean | ("true" | "false"); }; }; responses: { @@ -87786,33 +88089,35 @@ export interface operations { * @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. */ requestBody: { - "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; - } & (Record | Record | Record)) | null) | undefined; - }; - }) & (Record | Record)) | null; + 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; + } & (Record | Record | Record)) | null) | undefined; + }; + }) & (Record | Record)) | null; + }; }; responses: { /** @description Response */ @@ -87845,12 +88150,14 @@ export interface operations { "gists/create-comment": { /** Create a gist comment */ requestBody: { - "application/json": { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string; + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; }; }; responses: { @@ -87896,12 +88203,14 @@ export interface operations { "gists/update-comment": { /** Update a gist comment */ requestBody: { - "application/json": { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string; + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; }; }; responses: { @@ -88183,18 +88492,20 @@ export interface operations { "markdown/render": { /** Render a Markdown document */ requestBody: { - "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; + 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: { @@ -88219,8 +88530,10 @@ export interface operations { * @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. */ requestBody?: { - "text/plain": string; - "text/x-markdown": string; + content: { + "text/plain": string; + "text/x-markdown": string; + }; }; responses: { /** @description Response */ @@ -88437,14 +88750,16 @@ export interface operations { * @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/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ requestBody?: { - "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; + 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: { @@ -88521,12 +88836,14 @@ export interface operations { * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. */ requestBody?: { - "application/json": { - /** - * @description Whether to block all notifications from a thread. - * @default false - */ - ignored?: boolean; + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; }; }; responses: { @@ -88604,7 +88921,7 @@ export interface operations { * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ parameters: { /** @description The unique identifier of the organization. */ @@ -88653,127 +88970,129 @@ export interface operations { * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ requestBody?: { - "application/json": { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string; - /** @description The company name. */ - company?: string; - /** @description The publicly visible email address. */ - email?: string; - /** @description The Twitter username of the company. */ - twitter_username?: string; - /** @description The location. */ - location?: string; - /** @description The shorthand name of the company. */ - name?: string; - /** @description The description of the company. */ - description?: string; - /** @description Whether an organization can use organization projects. */ - has_organization_projects?: boolean; - /** @description Whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean; - /** - * @description Default permission level members have for organization repositories. - * @default read - * @enum {string} - */ - default_repository_permission?: "read" | "write" | "admin" | "none"; - /** - * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean; - /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - members_can_create_internal_repositories?: boolean; - /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - members_can_create_private_repositories?: boolean; - /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - members_can_create_public_repositories?: boolean; - /** - * @description Specifies which types of repositories non-admin organization members can create. `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; + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `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: { @@ -88859,9 +89178,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ requestBody: { - "application/json": { - enabled_repositories: components["schemas"]["enabled-repositories"]; - allowed_actions?: components["schemas"]["allowed-actions"]; + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; }; }; responses: { @@ -88896,9 +89217,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ requestBody: { - "application/json": { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: (number)[]; + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -88958,7 +89281,9 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ requestBody?: { - "application/json": components["schemas"]["selected-actions"]; + content: { + "application/json": components["schemas"]["selected-actions"]; + }; }; responses: { /** @description Response */ @@ -88993,7 +89318,9 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ requestBody?: { - "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; }; responses: { /** @description Success response */ @@ -89033,31 +89360,33 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description Name of the runner group. */ - name: string; - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. - * @default all - * @enum {string} - */ - visibility?: "selected" | "all" | "private"; - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: (number)[]; - /** @description List of runner IDs to add to the runner group. */ - runners?: (number)[]; - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean; - /** - * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. - * @default false - */ - restricted_to_workflows?: boolean; - /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ - selected_workflows?: (string)[]; + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: (number)[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: (number)[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; }; }; responses: { @@ -89111,26 +89440,28 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description Name of the runner group. */ - name: string; - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. - * @enum {string} - */ - visibility?: "selected" | "all" | "private"; - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean; - /** - * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. - * @default false - */ - restricted_to_workflows?: boolean; - /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ - selected_workflows?: (string)[]; + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: (string)[]; + }; }; }; responses: { @@ -89173,9 +89504,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: (number)[]; + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -89232,9 +89565,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description List of runner IDs to add to the runner group. */ - runners: (number)[]; + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: (number)[]; + }; }; }; responses: { @@ -89409,9 +89744,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "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)[]; + 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: { @@ -89428,9 +89765,11 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description The names of the custom labels to add to the runner. */ - labels: (string)[]; + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: (string)[]; + }; }; }; responses: { @@ -89598,18 +89937,20 @@ export interface operations { * ``` */ requestBody: { - "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)[]; + 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)[]; + }; }; }; responses: { @@ -89656,9 +89997,11 @@ export interface operations { * @description Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ requestBody: { - "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/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: (number)[]; + 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/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -89806,14 +90149,16 @@ export interface operations { * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "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 be granted access to codespaces in the organization. Required when `visibility` is `selected_members`. */ - selected_usernames?: (string)[]; + 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 be granted access to codespaces in the organization. Required when `visibility` is `selected_members`. */ + selected_usernames?: (string)[]; + }; }; }; responses: { @@ -89960,18 +90305,20 @@ export interface operations { * ``` */ requestBody: { - "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/reference/codespaces#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/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: (number)[]; + 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/reference/codespaces#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/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (number)[]; + }; }; }; responses: { @@ -90022,9 +90369,11 @@ export interface operations { * @description Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ requestBody: { - "application/json": { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: (number)[]; + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -90083,21 +90432,23 @@ export interface operations { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ requestBody: { - "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 The system role from which this role inherits permissions. - * @enum {string} - */ - base_role: "read" | "triage" | "write" | "maintain"; - /** @description A list of additional permissions included in this role. */ - permissions: (string)[]; + 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 The system role from which this role inherits permissions. + * @enum {string} + */ + base_role: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions: (string)[]; + }; }; }; responses: { @@ -90121,7 +90472,7 @@ export interface operations { * To use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ responses: { /** @description Response */ @@ -90144,7 +90495,7 @@ export interface operations { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ responses: { /** @description Response */ @@ -90161,21 +90512,23 @@ export interface operations { * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. * - * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + * For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)." */ requestBody: { - "application/json": { - /** @description The name of the custom role. */ - name?: string; - /** @description A short description about who this role is for or what permissions it grants. */ - description?: string; - /** - * @description The system role from which this role inherits permissions. - * @enum {string} - */ - base_role?: "read" | "triage" | "write" | "maintain"; - /** @description A list of additional permissions included in this role. If specified, these permissions will replace any currently set on the role. */ - permissions?: (string)[]; + content: { + "application/json": { + /** @description The name of the custom role. */ + name?: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. If specified, these permissions will replace any currently set on the role. */ + permissions?: (string)[]; + }; }; }; responses: { @@ -90343,18 +90696,20 @@ export interface operations { * ``` */ requestBody: { - "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)[]; + 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)[]; + }; }; }; responses: { @@ -90401,9 +90756,11 @@ export interface operations { * @description Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ requestBody: { - "application/json": { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: (number)[]; + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -90514,32 +90871,34 @@ export interface operations { * @description Here's how you can create a hook that posts payloads in JSON format: */ requestBody: { - "application/json": { - /** @description Must be passed as "web". */ - name: string; - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ - config: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - /** @example "kdaigle" */ - username?: string; - /** @example "password" */ - password?: string; + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @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; }; - /** - * @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: { @@ -90586,28 +90945,30 @@ export interface operations { * @description Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ requestBody?: { - "application/json": { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ - config?: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @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; }; - /** - * @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: { @@ -90645,11 +91006,13 @@ export interface operations { * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. */ requestBody?: { - "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"]; + 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: { @@ -90771,7 +91134,9 @@ export interface operations { * @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. */ requestBody: { - "application/json": components["schemas"]["interaction-limit"]; + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; }; responses: { /** @description Response */ @@ -90819,22 +91184,24 @@ export interface operations { * 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. */ requestBody?: { - "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. - * @default direct_member - * @enum {string} - */ - role?: "admin" | "direct_member" | "billing_manager"; - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: (number)[]; + 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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: (number)[]; + }; }; }; responses: { @@ -91055,15 +91422,17 @@ export interface operations { * 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. */ requestBody?: { - "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"; + 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: { @@ -91120,51 +91489,53 @@ export interface operations { * @description Initiates the generation of a migration archive. */ requestBody: { - "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. The array can include any of: `"repositories"`. */ - exclude?: ("repositories")[]; + 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. The array can include any of: `"repositories"`. */ + exclude?: ("repositories")[]; + }; }; }; responses: { @@ -91291,12 +91662,14 @@ export interface operations { * @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/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ requestBody?: { - "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; + 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: { @@ -91529,11 +91902,13 @@ export interface operations { * @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. */ requestBody: { - "application/json": { - /** @description The name of the project. */ - name: string; - /** @description The description of the project. */ - body?: string; + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; }; }; responses: { @@ -91636,125 +92011,127 @@ export interface operations { * * `repo` scope to create a private repository */ requestBody: { - "application/json": { - /** @description The name of the repository. */ - name: string; - /** @description A short description of the repository. */ - description?: string; - /** @description A URL with more information about the repository. */ - homepage?: string; - /** - * @description Whether the repository is private. - * @default false - */ - private?: boolean; - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. - * @enum {string} - */ - visibility?: "public" | "private" | "internal"; - /** - * @description Either `true` to enable issues for this repository or `false` to disable them. - * @default true - */ - has_issues?: boolean; - /** - * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - * @default true - */ - has_projects?: boolean; - /** - * @description Either `true` to enable the wiki for this repository or `false` to disable it. - * @default true - */ - has_wiki?: boolean; - /** - * @description 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. - * @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"; + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description 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. + * @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"; + }; }; }; responses: { @@ -91944,35 +92321,37 @@ export interface operations { * 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)". */ requestBody: { - "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 **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; + 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 **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: { @@ -92025,29 +92404,31 @@ export interface operations { * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. */ requestBody?: { - "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 **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; + 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 **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; + }; }; }; responses: { @@ -92103,16 +92484,18 @@ export interface operations { * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ requestBody: { - "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; + 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: { @@ -92160,11 +92543,13 @@ export interface operations { * **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}`. */ requestBody?: { - "application/json": { - /** @description The discussion post's title. */ - title?: string; - /** @description The discussion post's body text. */ - body?: string; + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; }; }; responses: { @@ -92205,9 +92590,11 @@ export interface operations { * **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`. */ requestBody: { - "application/json": { - /** @description The discussion comment's body text. */ - body: string; + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; }; }; responses: { @@ -92255,9 +92642,11 @@ export interface operations { * **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}`. */ requestBody: { - "application/json": { - /** @description The discussion comment's body text. */ - body: string; + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; }; }; responses: { @@ -92302,12 +92691,14 @@ export interface operations { * **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`. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -92370,12 +92761,14 @@ export interface operations { * **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`. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -92490,13 +92883,15 @@ export interface operations { * **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}`. */ requestBody?: { - "application/json": { - /** - * @description The role that this user should have in the team. - * @default member - * @enum {string} - */ - role?: "member" | "maintainer"; + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; }; }; responses: { @@ -92575,13 +92970,15 @@ export interface operations { * **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}`. */ requestBody?: { - "application/json": ({ - /** - * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * @enum {string} - */ - permission?: "read" | "write" | "admin"; - }) | null; + content: { + "application/json": ({ + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }) | null; + }; }; responses: { /** @description Response */ @@ -92662,12 +93059,14 @@ export interface operations { * 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)". */ requestBody?: { - "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; + 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: { @@ -92763,17 +93162,19 @@ export interface operations { "projects/update-card": { /** Update an existing project card */ requestBody?: { - "application/json": { - /** - * @description The project card's note - * @example Update all gems - */ - note?: string; - /** - * @description Whether or not the card is archived - * @example false - */ - archived?: boolean; + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; }; }; responses: { @@ -92793,17 +93194,19 @@ export interface operations { "projects/move-card": { /** Move a project card */ requestBody: { - "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; + 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: { @@ -92875,12 +93278,14 @@ export interface operations { "projects/update-column": { /** Update an existing project column */ requestBody: { - "application/json": { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string; + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; }; }; responses: { @@ -92921,24 +93326,26 @@ export interface operations { "projects/create-card": { /** Create a project card */ requestBody: { - "application/json": OneOf<[{ - /** - * @description The project card's note - * @example Update all gems - */ - note: string; - }, { - /** - * @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; - }]>; + content: { + "application/json": OneOf<[{ + /** + * @description The project card's note + * @example Update all gems + */ + note: string; + }, { + /** + * @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 */ @@ -92975,12 +93382,14 @@ export interface operations { "projects/move-column": { /** Move a project column */ requestBody: { - "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; + 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: { @@ -93043,29 +93452,31 @@ export interface operations { * @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. */ requestBody?: { - "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; - /** - * @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; + 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; + /** + * @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: { @@ -93127,15 +93538,17 @@ export interface operations { * @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. */ requestBody?: { - "application/json": ({ - /** - * @description The permission to grant the collaborator. - * @default write - * @example write - * @enum {string} - */ - permission?: "read" | "write" | "admin"; - }) | null; + content: { + "application/json": ({ + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }) | null; + }; }; responses: { /** @description Response */ @@ -93201,12 +93614,14 @@ export interface operations { "projects/create-column": { /** Create a project column */ requestBody: { - "application/json": { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string; + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; }; }; responses: { @@ -93292,158 +93707,160 @@ export interface operations { * @description **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ requestBody?: { - "application/json": { - /** @description The name of the repository. */ - name?: string; - /** @description A short description of the repository. */ - description?: string; - /** @description A URL with more information about the repository. */ - homepage?: string; - /** - * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. - * @default false - */ - private?: boolean; - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." - * @enum {string} - */ - visibility?: "public" | "private" | "internal"; - /** - * @description Specify which security and analysis features to enable or disable for the repository. - * - * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/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 `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. - * @default false - */ - archived?: boolean; - /** - * @description Either `true` to allow private forks, or `false` to prevent private forks. - * @default false - */ - allow_forking?: boolean; - /** - * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. - * @default false - */ - web_commit_signoff_required?: boolean; + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/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 `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; }; }; responses: { @@ -93628,13 +94045,15 @@ export interface operations { * @description Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ requestBody?: { - "application/json": { - /** - * @description Whether to enable debug logging for the re-run. - * @default false - */ - enable_debug_logging?: boolean; - } | null; + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; }; responses: { /** @description Response */ @@ -93672,9 +94091,11 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. */ requestBody: { - "application/json": { - enabled: components["schemas"]["actions-enabled"]; - allowed_actions?: components["schemas"]["allowed-actions"]; + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; }; }; responses: { @@ -93710,7 +94131,9 @@ export interface operations { * repository `administration` permission to use this endpoint. */ requestBody: { - "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; }; responses: { /** @description Response */ @@ -93745,7 +94168,9 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. */ requestBody?: { - "application/json": components["schemas"]["selected-actions"]; + content: { + "application/json": components["schemas"]["selected-actions"]; + }; }; responses: { /** @description Response */ @@ -93780,7 +94205,9 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. */ requestBody: { - "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; }; responses: { /** @description Success response */ @@ -93924,9 +94351,11 @@ export interface operations { * endpoint. */ requestBody: { - "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)[]; + 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: { @@ -93944,9 +94373,11 @@ export interface operations { * endpoint. */ requestBody: { - "application/json": { - /** @description The names of the custom labels to add to the runner. */ - labels: (string)[]; + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: (string)[]; + }; }; }; responses: { @@ -94228,26 +94659,28 @@ export interface operations { * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ requestBody: { - "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; + 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: { @@ -94265,13 +94698,15 @@ export interface operations { * @description Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ requestBody?: { - "application/json": { - /** - * @description Whether to enable debug logging for the re-run. - * @default false - */ - enable_debug_logging?: boolean; - } | null; + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; }; responses: { /** @description Response */ @@ -94288,13 +94723,15 @@ export interface operations { * @description Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ requestBody?: { - "application/json": { - /** - * @description Whether to enable debug logging for the re-run. - * @default false - */ - enable_debug_logging?: boolean; - } | null; + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; }; responses: { /** @description Response */ @@ -94450,11 +94887,13 @@ export interface operations { * ``` */ requestBody: { - "application/json": { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ - encrypted_value?: string; - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string; + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; }; }; responses: { @@ -94534,12 +94973,14 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." */ requestBody: { - "application/json": { - /** @description The git reference for the workflow. The reference can be a branch or tag name. */ - ref: string; - /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ - inputs?: { - [key: string]: string | undefined; + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { + [key: string]: string | undefined; + }; }; }; }; @@ -94663,16 +95104,18 @@ export interface operations { * @description Users with admin access to the repository can create an autolink. */ requestBody: { - "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; + 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: { @@ -94800,87 +95243,89 @@ export interface operations { * **Note**: The list of users, apps, and teams in total is limited to 100 items. */ requestBody: { - "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; + 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; + /** @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 someone other than the person who last pushed to the branch must approve this pull request. 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; + /** @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; /** - * @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. + * @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 */ - 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; - /** @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; + lock_branch?: boolean; /** - * @description Whether someone other than the person who last pushed to the branch must approve this pull request. Default: `false`. + * @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 */ - 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; - /** @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; + allow_fork_syncing?: boolean; + }; }; }; responses: { @@ -94984,35 +95429,37 @@ export interface operations { * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. */ requestBody?: { - "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 someone other than the person who last pushed to the branch must approve this pull request. 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)[]; + 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 someone other than the person who last pushed to the branch must approve this pull request. 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)[]; + }; }; }; }; @@ -95108,21 +95555,23 @@ export interface operations { * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. */ requestBody?: { - "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; - })[]; + 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: { @@ -95157,10 +95606,12 @@ export interface operations { * @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. */ requestBody?: { - "application/json": OneOf<[{ - /** @description The name of the status checks */ - contexts: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95179,10 +95630,12 @@ export interface operations { * @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. */ requestBody?: { - "application/json": OneOf<[{ - /** @description The name of the status checks */ - contexts: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95202,10 +95655,12 @@ export interface operations { * @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. */ requestBody?: { - "application/json": OneOf<[{ - /** @description The name of the status checks */ - contexts: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The name of the status checks */ + contexts: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95272,16 +95727,14 @@ export interface operations { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description apps parameter */ - apps: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95299,16 +95752,14 @@ export interface operations { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description apps parameter */ - apps: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95326,16 +95777,14 @@ export interface operations { * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description apps parameter */ - apps: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @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)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95376,10 +95825,12 @@ export interface operations { * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The slug values for teams */ - teams: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95403,10 +95854,12 @@ export interface operations { * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The slug values for teams */ - teams: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95430,10 +95883,12 @@ export interface operations { * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The slug values for teams */ - teams: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The slug values for teams */ + teams: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95474,10 +95929,12 @@ export interface operations { * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The username for users */ - users: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95501,10 +95958,12 @@ export interface operations { * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The username for users */ - users: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95528,10 +95987,12 @@ export interface operations { * | `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. | */ requestBody?: { - "application/json": OneOf<[{ - /** @description The username for users */ - users: (string)[]; - }, (string)[]]>; + content: { + "application/json": OneOf<[{ + /** @description The username for users */ + users: (string)[]; + }, (string)[]]>; + }; }; responses: { /** @description Response */ @@ -95563,9 +96024,11 @@ export interface operations { * * GitHub Apps must have the `administration:write` repository permission. */ requestBody: { - "application/json": { - /** @description The new name of the branch. */ - new_name: string; + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; }; }; responses: { @@ -95590,15 +96053,17 @@ export interface operations { * 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. */ requestBody: { - "application/json": OneOf<[{ - /** @enum {unknown} */ - status: "completed"; - [key: string]: unknown | undefined; - }, { - /** @enum {unknown} */ - status?: "queued" | "in_progress"; - [key: string]: unknown | undefined; - }]>; + content: { + "application/json": OneOf<[{ + /** @enum {unknown} */ + status: "completed"; + [key: string]: unknown | undefined; + }, { + /** @enum {unknown} */ + status?: "queued" | "in_progress"; + [key: string]: unknown | undefined; + }]>; + }; }; responses: { /** @description Response */ @@ -95633,94 +96098,96 @@ export interface operations { * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. */ requestBody: { - "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. - * @enum {string} - */ - status?: "queued" | "in_progress" | "completed"; - /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. - * @enum {string} - */ - conclusion?: "action_required" | "cancelled" | "failure" | "neutral" | "success" | "skipped" | "stale" | "timed_out"; - /** - * Format: date-time - * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string; - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. */ - output?: { - /** @description **Required**. */ - title?: string; - /** @description Can contain Markdown. */ - summary: string; - /** @description Can contain Markdown. */ - text?: string; - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ - 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; + 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. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: "action_required" | "cancelled" | "failure" | "neutral" | "success" | "skipped" | "stale" | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + 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. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: ({ + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; })[]; - }; - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ - actions?: ({ - /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ - label: string; - /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ - description: string; - /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ - identifier: string; - })[]; - }) & (({ - /** @enum {unknown} */ - status?: "completed"; - [key: string]: unknown | undefined; - }) | ({ - /** @enum {unknown} */ - status?: "queued" | "in_progress"; - [key: string]: unknown | undefined; - })); + }) & (({ + /** @enum {unknown} */ + status?: "completed"; + [key: string]: unknown | undefined; + }) | ({ + /** @enum {unknown} */ + status?: "queued" | "in_progress"; + [key: string]: unknown | undefined; + })); + }; }; responses: { /** @description Response */ @@ -95785,9 +96252,11 @@ export interface operations { * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. */ requestBody: { - "application/json": { - /** @description The sha of the head commit. */ - head_sha: string; + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; }; }; responses: { @@ -95811,17 +96280,19 @@ export interface operations { * @description Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ requestBody: { - "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; - })[]; + 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: { @@ -95955,10 +96426,12 @@ export interface operations { * @description Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ requestBody: { - "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"]; + 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: { @@ -96249,29 +96722,31 @@ export interface operations { * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." */ requestBody: { - "application/json": { - commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; - ref: components["schemas"]["code-scanning-ref"]; - sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string; - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string; - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string; - /** - * @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; + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @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: { @@ -96375,28 +96850,30 @@ export interface operations { * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. */ requestBody: { - "application/json": { - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string; - /** @description Location for this codespace. Assigned by IP if not provided */ - location?: string; - /** @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; + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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 */ @@ -96646,11 +97123,13 @@ export interface operations { * ``` */ requestBody: { - "application/json": { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ - encrypted_value?: string; - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string; + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; }; }; responses: { @@ -96751,12 +97230,14 @@ export interface operations { * 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. */ requestBody?: { - "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; + 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: { @@ -96841,9 +97322,11 @@ export interface operations { "repos/update-commit-comment": { /** Update a commit comment */ requestBody: { - "application/json": { - /** @description The contents of the comment */ - body: string; + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; }; }; responses: { @@ -96886,12 +97369,14 @@ export interface operations { * @description Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -97024,15 +97509,17 @@ export interface operations { * 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. */ requestBody: { - "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; + 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: { @@ -97414,32 +97901,34 @@ export interface operations { }; }; requestBody: { - "application/json": { - /** @description The commit message. */ - message: string; - /** @description The new file content, using Base64 encoding. */ - content: string; - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string; - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string; - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string; - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string; - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string; - }; - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string; - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string; - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string; + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; }; }; }; @@ -97481,26 +97970,28 @@ export interface operations { }; }; requestBody: { - "application/json": { - /** @description The commit message. */ - message: string; - /** @description The blob SHA of the file being deleted. */ - sha: string; - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string; - /** @description object containing information about the committer. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string; - /** @description The email of the author (or committer) of the commit */ - email?: string; - }; - /** @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; + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @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; + }; }; }; }; @@ -97608,20 +98099,22 @@ export interface operations { * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. */ requestBody: { - "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; + 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: { @@ -97767,11 +98260,13 @@ export interface operations { * ``` */ requestBody: { - "application/json": { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string; - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string; + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; }; }; responses: { @@ -97826,7 +98321,9 @@ export interface operations { * @description Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ requestBody: { - "application/json": components["schemas"]["snapshot"]; + content: { + "application/json": components["schemas"]["snapshot"]; + }; }; responses: { /** @description Response */ @@ -97925,41 +98422,43 @@ export interface operations { * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. */ requestBody: { - "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 | undefined; - }, 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; - /** - * @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; + 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 | undefined; + }, 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; + /** + * @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: { @@ -98039,39 +98538,41 @@ export interface operations { * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. */ requestBody: { - "application/json": { - /** - * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: "error" | "failure" | "inactive" | "in_progress" | "queued" | "pending" | "success"; - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string; - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string; - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string; - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} - */ - environment?: "production" | "staging" | "qa"; - /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default - */ - environment_url?: string; - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean; + 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`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean; + }; }; }; responses: { @@ -98123,12 +98624,14 @@ export interface operations { * This input example shows how you can use the `client_payload` as a test to debug your workflow. */ requestBody: { - "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 | undefined; + 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 | undefined; + }; }; }; }; @@ -98191,19 +98694,21 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ requestBody?: { - "application/json": { - wait_timer?: components["schemas"]["wait-timer"]; - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: ({ - type?: components["schemas"]["deployment-reviewer-type"]; - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number; - })[]; - deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; - } | null; + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: ({ + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + })[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; }; responses: { /** @description Response */ @@ -98261,7 +98766,9 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ requestBody: { - "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; }; responses: { /** @description Response */ @@ -98300,7 +98807,9 @@ export interface operations { * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ requestBody: { - "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; }; responses: { /** @description Response */ @@ -98363,14 +98872,16 @@ export interface operations { * **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). */ requestBody?: { - "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; + 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 */ @@ -98388,14 +98899,16 @@ export interface operations { "git/create-blob": { /** Create a blob */ requestBody: { - "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; + 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: { @@ -98474,39 +98987,41 @@ export interface operations { * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ requestBody: { - "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; + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: (string)[]; + /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ + signature?: string; }; - /** @description The [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: { @@ -98626,13 +99141,15 @@ export interface operations { * @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. */ requestBody: { - "application/json": { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string; - /** @description The SHA1 value for this reference. */ - sha: string; - /** @example "refs/heads/newbranch" */ - key?: string; + content: { + "application/json": { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; }; }; responses: { @@ -98675,14 +99192,16 @@ export interface operations { }; }; requestBody: { - "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; + 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: { @@ -98730,29 +99249,31 @@ export interface operations { * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ requestBody: { - "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; + 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; /** - * 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`. + * @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} */ - date?: 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; + }; }; }; }; @@ -98827,39 +99348,41 @@ export interface operations { * Returns an error if you try to delete a file that does not exist. */ requestBody: { - "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; - /** - * @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; + 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; + /** + * @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: { @@ -98933,33 +99456,35 @@ export interface operations { * share the same `config` as long as those webhooks do not have any `events` that overlap. */ requestBody?: { - "application/json": { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string; - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - url?: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - /** @example "abc" */ - token?: string; - /** @example "sha256" */ - digest?: string; - }; - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: (string)[]; - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean; - } | null; + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: (string)[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; }; responses: { /** @description Response */ @@ -99006,34 +99531,36 @@ export interface operations { * @description Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ requestBody: { - "application/json": { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - /** @example "bar@example.com" */ - address?: string; - /** @example "The Serious Room" */ - room?: string; + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: (string)[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: (string)[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: (string)[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; }; - /** - * @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: { @@ -99071,11 +99598,13 @@ export interface operations { * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. */ requestBody?: { - "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"]; + 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: { @@ -99209,20 +99738,22 @@ export interface operations { * @description Start a source import to a GitHub repository using GitHub Importer. */ requestBody: { - "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; + 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: { @@ -99263,23 +99794,25 @@ export interface operations { * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. */ requestBody?: { - "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; + 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 */ @@ -99320,11 +99853,13 @@ export interface operations { }; }; requestBody?: { - "application/json": { - /** @description The new Git author email. */ - email?: string; - /** @description The new Git author name. */ - name?: string; + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; }; }; responses: { @@ -99360,12 +99895,14 @@ export interface operations { * @description You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ requestBody: { - "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"; + 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: { @@ -99417,7 +99954,9 @@ export interface operations { * @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. */ requestBody: { - "application/json": components["schemas"]["interaction-limit"]; + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; }; responses: { /** @description Response */ @@ -99469,12 +100008,14 @@ export interface operations { "repos/update-invitation": { /** Update a repository invitation */ requestBody?: { - "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"; + 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: { @@ -99535,23 +100076,25 @@ export interface operations { * 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. */ requestBody: { - "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; - milestone?: string | number; - /** @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; - color?: string; - }]>)[]; - /** @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)[]; + 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; + milestone?: string | number; + /** @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; + color?: string; + }]>)[]; + /** @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: { @@ -99619,9 +100162,11 @@ export interface operations { "issues/update-comment": { /** Update an issue comment */ requestBody: { - "application/json": { - /** @description The contents of the comment. */ - body: string; + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; }; }; responses: { @@ -99664,12 +100209,14 @@ export interface operations { * @description Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -99768,34 +100315,36 @@ export interface operations { * @description Issue owners and users with push access can edit an issue. */ requestBody?: { - "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. **This field is deprecated.** */ - assignee?: string; - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: "open" | "closed"; - /** - * @description The reason for the current state - * @example not_planned - * @enum {string|null} - */ - state_reason?: "completed" | "not_planned" | "reopened"; - milestone?: string | number; - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: (OneOf<[string, { - id?: number; - name?: string; - description?: string; - color?: string; - }]>)[]; - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: (string)[]; + 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. **This field is deprecated.** */ + assignee?: string; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: "completed" | "not_planned" | "reopened" | null; + milestone?: string | number; + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: (OneOf<[string, { + id?: number; + name?: string; + description?: string; + color?: string; + }]>)[]; + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: (string)[]; + }; }; }; responses: { @@ -99819,9 +100368,11 @@ export interface operations { * @description Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ requestBody?: { - "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)[]; + 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: { @@ -99839,9 +100390,11 @@ export interface operations { * @description Removes one or more assignees from an issue. */ requestBody?: { - "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)[]; + 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: { @@ -99878,9 +100431,11 @@ export interface operations { * @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. */ requestBody: { - "application/json": { - /** @description The contents of the comment. */ - body: string; + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; }; }; responses: { @@ -99938,16 +100493,18 @@ export interface operations { * @description Removes any previous labels and sets the new labels for an issue. */ requestBody?: { - "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/reference/issues#add-labels-to-an-issue)." */ - labels?: (string)[]; - }, (string)[], { - labels?: ({ + 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/reference/issues#add-labels-to-an-issue)." */ + labels?: (string)[]; + }, (string)[], { + labels?: ({ + name: string; + })[]; + }, ({ name: string; - })[]; - }, ({ - name: string; - })[], string]>; + })[], string]>; + }; }; responses: { /** @description Response */ @@ -99965,16 +100522,18 @@ export interface operations { "issues/add-labels": { /** Add labels to an issue */ requestBody?: { - "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/reference/issues#set-labels-for-an-issue)." */ - labels?: (string)[]; - }, (string)[], { - labels?: ({ + 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/reference/issues#set-labels-for-an-issue)." */ + labels?: (string)[]; + }, (string)[], { + labels?: ({ + name: string; + })[]; + }, ({ name: string; - })[]; - }, ({ - name: string; - })[], string]>; + })[], string]>; + }; }; responses: { /** @description Response */ @@ -100029,17 +100588,19 @@ export interface operations { * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ requestBody?: { - "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; + 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 */ @@ -100093,12 +100654,14 @@ export interface operations { * @description Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -100165,17 +100728,19 @@ export interface operations { * @description You can create a read-only deploy key. */ requestBody: { - "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; + 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: { @@ -100232,13 +100797,15 @@ export interface operations { "issues/create-label": { /** Create a label */ requestBody: { - "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; + 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: { @@ -100293,13 +100860,15 @@ export interface operations { }; }; requestBody?: { - "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; + 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: { @@ -100374,9 +100943,11 @@ export interface operations { * @description Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ requestBody: { - "application/json": { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string; + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; }; }; responses: { @@ -100395,13 +100966,15 @@ export interface operations { "repos/merge": { /** Merge a branch */ requestBody: { - "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; + 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: { @@ -100449,22 +101022,24 @@ export interface operations { "issues/create-milestone": { /** Create a milestone */ requestBody: { - "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; + 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: { @@ -100505,22 +101080,24 @@ export interface operations { "issues/update-milestone": { /** Update a milestone */ requestBody?: { - "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; + 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: { @@ -100569,12 +101146,14 @@ export interface operations { * @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/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ requestBody?: { - "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; + 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: { @@ -100609,28 +101188,30 @@ export interface operations { * @description Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ requestBody: { - "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; - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean; - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean; - /** - * @description The 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; + 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; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @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} */ - path: "/" | "/docs"; - }); - }) & (Record | Record | Record | Record | Record); + 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"; + }); + }) & (Record | Record | Record | Record | Record); + }; }; responses: { /** @description Response */ @@ -100646,24 +101227,26 @@ export interface operations { * @description Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ requestBody: { - "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; + content: { + "application/json": (({ /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. * @enum {string} */ - path?: "/" | "/docs"; - }; - }) & (Record | Record)) | null; + 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"; + }; + }) & (Record | Record)) | null; + }; }; responses: { /** @description Response */ @@ -100754,21 +101337,23 @@ export interface operations { * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. */ requestBody: { - "application/json": { - /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ - 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; + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + 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: { @@ -100846,11 +101431,13 @@ export interface operations { * @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. */ requestBody: { - "application/json": { - /** @description The name of the project. */ - name: string; - /** @description The description of the project. */ - body?: string; + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; }; }; responses: { @@ -100910,24 +101497,26 @@ export interface operations { * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ requestBody: { - "application/json": { - /** @description The title of the new pull request. Required unless `issue` is specified. */ - title?: string; - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string; - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string; - /** @description The contents of the pull request. */ - body?: string; - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean; - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean; - /** - * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. - * @example 1 - */ - issue?: number; + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string; + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; }; }; responses: { @@ -101001,9 +101590,11 @@ export interface operations { * @description Enables you to edit a review comment. */ requestBody: { - "application/json": { - /** @description The text of the reply to the review comment. */ - body: string; + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; }; }; responses: { @@ -101045,12 +101636,14 @@ export interface operations { * @description Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -101121,20 +101714,22 @@ export interface operations { * 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. */ requestBody?: { - "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; + 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: { @@ -101158,26 +101753,28 @@ export interface operations { * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. */ requestBody: { - "application/json": { - /** @description Location for this codespace. Assigned by IP if not provided */ - location?: string; - /** @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; + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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 */ @@ -101234,37 +101831,39 @@ export interface operations { * 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. */ requestBody: { - "application/json": { - /** @description The text of the review comment. */ - body: string; - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id: string; - /** @description The relative path to the file that necessitates a comment. */ - path: string; - /** - * @deprecated - * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. - */ - position?: number; - /** - * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: "LEFT" | "RIGHT"; - /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line: number; - /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/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; + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/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; + }; }; }; responses: { @@ -101290,9 +101889,11 @@ export interface operations { * 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. */ requestBody: { - "application/json": { - /** @description The text of the review comment. */ - body: string; + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; }; }; responses: { @@ -101361,19 +101962,21 @@ export interface operations { * @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. */ requestBody?: { - "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; + 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 */ @@ -101428,12 +102031,14 @@ export interface operations { * @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. */ requestBody?: { - "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)[]; - } & (Record | Record); + 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)[]; + } & (Record | Record); + }; }; responses: { /** @description Response */ @@ -101450,11 +102055,13 @@ export interface operations { "pulls/remove-requested-reviewers": { /** Remove requested reviewers from a pull request */ requestBody: { - "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)[]; + 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: { @@ -101496,33 +102103,35 @@ export interface operations { * 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. */ requestBody?: { - "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#submit-a-review-for-a-pull-request) when you are ready. - * @enum {string} - */ - event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: ({ - /** @description The relative path to the file that necessitates a review comment. */ - path: string; - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number; - /** @description Text of the review comment. */ - body: string; - /** @example 28 */ - line?: number; - /** @example RIGHT */ - side?: string; - /** @example 26 */ - start_line?: number; - /** @example LEFT */ - start_side?: string; - })[]; + 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#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: ({ + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + })[]; + }; }; }; responses: { @@ -101554,9 +102163,11 @@ export interface operations { * @description Update the review summary comment with new text. */ requestBody: { - "application/json": { - /** @description The body text of the pull request review. */ - body: string; + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; }; }; responses: { @@ -101606,14 +102217,16 @@ export interface operations { * @description **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ requestBody: { - "application/json": { - /** @description The message for the pull request review dismissal */ - message: string; - /** - * @example "DISMISS" - * @enum {string} - */ - event?: "DISMISS"; + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; }; }; responses: { @@ -101633,14 +102246,16 @@ export interface operations { * @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#create-a-review-for-a-pull-request)." */ requestBody: { - "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"; + 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: { @@ -101661,10 +102276,12 @@ export interface operations { * @description Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ requestBody?: { - "application/json": { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string; - } | null; + content: { + "application/json": { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; }; responses: { /** @description Response */ @@ -101760,38 +102377,40 @@ export interface operations { * 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. */ requestBody: { - "application/json": { - /** @description The name of the tag. */ - tag_name: string; - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string; - /** @description The name of the release. */ - name?: string; - /** @description Text describing the contents of the tag. */ - body?: string; - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean; - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean; - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string; - /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false - */ - generate_release_notes?: boolean; - /** - * @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"; + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @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: { @@ -101843,13 +102462,15 @@ export interface operations { * @description Users with push access to the repository can edit a release asset. */ requestBody?: { - "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; + 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: { @@ -101867,15 +102488,17 @@ export interface operations { * @description Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ requestBody: { - "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; + 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: { @@ -101956,27 +102579,29 @@ export interface operations { * @description Users with push access to the repository can edit a release. */ requestBody?: { - "application/json": { - /** @description The name of the tag. */ - tag_name?: string; - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string; - /** @description The name of the release. */ - name?: string; - /** @description Text describing the contents of the tag. */ - body?: string; - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean; - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean; - /** - * @description 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; + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description 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: { @@ -102037,7 +102662,9 @@ export interface operations { }; }; requestBody?: { - "*/*": string; + content: { + "*/*": string; + }; }; responses: { /** @description Response for successful upload */ @@ -102080,12 +102707,14 @@ export interface operations { * @description Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. - * @enum {string} - */ - content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -102169,10 +102798,12 @@ export interface operations { * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ requestBody: { - "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"]; + 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: { @@ -102340,25 +102971,27 @@ export interface operations { }; }; requestBody: { - "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; - /** @description A short description of the status. */ - description?: string; - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string; + 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; + /** @description A short description of the status. */ + description?: string; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; }; }; responses: { @@ -102411,11 +103044,13 @@ export interface operations { * @description If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ requestBody?: { - "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; + 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: { @@ -102476,9 +103111,11 @@ export interface operations { * This endpoint is only available to repository administrators. */ requestBody: { - "application/json": { - /** @description An optional glob pattern to match against when enforcing tag protection. */ - pattern: string; + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; }; }; responses: { @@ -102552,9 +103189,11 @@ export interface operations { "repos/replace-all-topics": { /** Replace all repository topics */ requestBody: { - "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)[]; + 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: { @@ -102634,11 +103273,15 @@ export interface operations { * @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/). */ requestBody: { - "application/json": { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string; - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: (number)[]; + 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: { @@ -102720,23 +103363,25 @@ export interface operations { }; }; requestBody: { - "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; + 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: { @@ -102905,11 +103550,13 @@ export interface operations { * ``` */ requestBody: { - "application/json": { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string; - /** @description ID of the key you used to encrypt the secret. */ - key_id: string; + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; }; }; responses: { @@ -103246,29 +103893,31 @@ export interface operations { * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. */ requestBody: { - "application/json": { - /** @description The name of the team. */ - name: string; - /** @description The description of the team. */ - description?: string; - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: "secret" | "closed"; - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. - * @default pull - * @enum {string} - */ - permission?: "pull" | "push" | "admin"; - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number; + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; }; }; responses: { @@ -103320,16 +103969,18 @@ export interface operations { * 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. */ requestBody: { - "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; + 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: { @@ -103380,11 +104031,13 @@ export interface operations { * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ requestBody?: { - "application/json": { - /** @description The discussion post's title. */ - title?: string; - /** @description The discussion post's body text. */ - body?: string; + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; }; }; responses: { @@ -103427,9 +104080,11 @@ export interface operations { * 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. */ requestBody: { - "application/json": { - /** @description The discussion comment's body text. */ - body: string; + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; }; }; responses: { @@ -103480,9 +104135,11 @@ export interface operations { * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ requestBody: { - "application/json": { - /** @description The discussion comment's body text. */ - body: string; + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; }; }; responses: { @@ -103529,12 +104186,14 @@ export interface operations { * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -103581,12 +104240,14 @@ export interface operations { * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ requestBody: { - "application/json": { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + }; }; }; responses: { @@ -103751,13 +104412,15 @@ export interface operations { * 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. */ requestBody?: { - "application/json": { - /** - * @description The role that this user should have in the team. - * @default member - * @enum {string} - */ - role?: "member" | "maintainer"; + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; }; }; responses: { @@ -103842,12 +104505,14 @@ export interface operations { * 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. */ requestBody?: { - "application/json": { - /** - * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * @enum {string} - */ - permission?: "read" | "write" | "admin"; + content: { + "application/json": { + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; }; }; responses: { @@ -103934,12 +104599,14 @@ export interface operations { * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ requestBody?: { - "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"; + 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: { @@ -104008,41 +104675,43 @@ export interface operations { * @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. */ requestBody?: { - "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; - /** - * @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; + 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; + /** + * @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: { @@ -104154,48 +104823,50 @@ export interface operations { * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. */ requestBody: { - "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 Location for this codespace. Assigned by IP if not provided */ - location?: string; - /** @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; + content: { + "application/json": OneOf<[{ /** @description Repository id for this codespace */ repository_id: number; - }; - /** @description Location for this codespace. Assigned by IP if not provided */ - location?: 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 Working directory for this codespace */ - working_directory?: string; - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number; - }]>; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @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 Location for this codespace. Assigned by IP if not provided */ + location?: 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 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 */ @@ -104360,13 +105031,15 @@ export interface operations { * ``` */ requestBody: { - "application/json": { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value?: string; - /** @description ID of the key you used to encrypt the secret. */ - key_id: string; - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: (string)[]; + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: (string)[]; + }; }; }; responses: { @@ -104431,9 +105104,11 @@ export interface operations { * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. */ requestBody: { - "application/json": { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: (number)[]; + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: (number)[]; + }; }; }; responses: { @@ -104540,13 +105215,15 @@ export interface operations { * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. */ requestBody?: { - "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)[]; + 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: { @@ -104688,12 +105365,14 @@ export interface operations { * @description Sets the visibility for your primary email addresses. */ requestBody: { - "application/json": { - /** - * @description Denotes whether an email is publicly visible. - * @enum {string} - */ - visibility: "public" | "private"; + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; }; }; responses: { @@ -104737,13 +105416,15 @@ export interface operations { * @description This endpoint is accessible with the `user` scope. */ requestBody?: { - "application/json": OneOf<[{ - /** - * @description Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. - * @example [] - */ - emails: (string)[]; - }, (string)[], string]>; + content: { + "application/json": OneOf<[{ + /** + * @description Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + * @example [] + */ + emails: (string)[]; + }, (string)[], string]>; + }; }; responses: { /** @description Response */ @@ -104765,10 +105446,12 @@ export interface operations { * @description This endpoint is accessible with the `user` scope. */ requestBody?: { - "application/json": OneOf<[{ - /** @description Email addresses associated with the GitHub user account. */ - emails: (string)[]; - }, (string)[], string]>; + content: { + "application/json": OneOf<[{ + /** @description Email addresses associated with the GitHub user account. */ + emails: (string)[]; + }, (string)[], string]>; + }; }; responses: { /** @description Response */ @@ -104893,11 +105576,13 @@ export interface operations { * @description Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ requestBody: { - "application/json": { - /** @description A descriptive name for the new key. */ - name?: string; - /** @description A GPG key in ASCII-armored format. */ - armored_public_key: string; + 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: { @@ -105058,7 +105743,9 @@ export interface operations { * @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. */ requestBody: { - "application/json": components["schemas"]["interaction-limit"]; + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; }; responses: { /** @description Response */ @@ -105141,14 +105828,16 @@ export interface operations { * @description Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ requestBody: { - "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; + 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: { @@ -105276,12 +105965,14 @@ export interface operations { "orgs/update-membership-for-authenticated-user": { /** Update an organization membership for the authenticated user */ requestBody: { - "application/json": { - /** - * @description The state that the membership should be in. Only `"active"` will be accepted. - * @enum {string} - */ - state: "active"; + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; }; }; responses: { @@ -105322,51 +106013,53 @@ export interface operations { * @description Initiates the generation of a user migration archive. */ requestBody: { - "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)[]; + 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: { @@ -105680,17 +106373,19 @@ export interface operations { * @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. */ requestBody: { - "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; + 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; + }; }; }; responses: { @@ -105779,132 +106474,140 @@ export interface operations { * * `repo` scope to create a private repository. */ requestBody: { - "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 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; + 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: { @@ -105996,14 +106699,16 @@ export interface operations { * @description Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ requestBody: { - "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; + 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: { @@ -106759,5 +107464,3 @@ export interface operations { }; }; } - -export type external = Record; diff --git a/examples/stripe-api.ts b/examples/stripe-api.ts index 9f0ff3c1c..2cf34c42d 100644 --- a/examples/stripe-api.ts +++ b/examples/stripe-api.ts @@ -2016,7 +2016,7 @@ export interface components { * @description The business type. * @enum {string|null} */ - business_type?: "company" | "government_entity" | "individual" | "non_profit"; + business_type?: "company" | "government_entity" | "individual" | "non_profit" | null; capabilities?: components["schemas"]["account_capabilities"]; /** @description Whether the account can create live charges. */ charges_enabled?: boolean; @@ -2698,7 +2698,7 @@ export interface components { * @description The status of the most recent automated tax calculation for this invoice. * @enum {string|null} */ - status?: "complete" | "failed" | "requires_location_inputs"; + status?: "complete" | "failed" | "requires_location_inputs" | null; }; /** * Balance @@ -3040,7 +3040,7 @@ export interface components { * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. * @enum {string|null} */ - locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IE" | "en-IN" | "en-NZ" | "en-SG" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; + locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IE" | "en-IN" | "en-NZ" | "en-SG" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW" | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -3382,7 +3382,7 @@ export interface components { * @description Describes whether Checkout should collect the customer's billing address. * @enum {string|null} */ - billing_address_collection?: "auto" | "required"; + billing_address_collection?: "auto" | "required" | null; /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ cancel_url: string; /** @@ -3414,7 +3414,7 @@ export interface components { * @description Configure whether a Checkout Session creates a Customer when the Checkout Session completes. * @enum {string|null} */ - customer_creation?: "always" | "if_required"; + customer_creation?: "always" | "if_required" | null; /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ customer_details?: components["schemas"]["payment_pages_checkout_session_customer_details"] | null; /** @@ -3458,7 +3458,7 @@ export interface components { * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. * @enum {string|null} */ - locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-GB" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; + locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-GB" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW" | null; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: ({ [key: string]: string | undefined; @@ -3481,7 +3481,7 @@ export interface components { * @description Configure whether a Checkout Session should collect a payment method. * @enum {string|null} */ - payment_method_collection?: "always" | "if_required"; + payment_method_collection?: "always" | "if_required" | null; /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options?: components["schemas"]["checkout_session_payment_method_options"] | null; /** @@ -3512,7 +3512,7 @@ export interface components { * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} */ - status?: "complete" | "expired" | "open"; + status?: "complete" | "expired" | "open" | null; /** * @description Describes the type of transaction being performed by Checkout in order to customize * relevant text on the page, such as the submit button. `submit_type` can only be @@ -3520,7 +3520,7 @@ export interface components { * in `subscription` or `setup` mode. * @enum {string|null} */ - submit_type?: "auto" | "book" | "donate" | "pay"; + submit_type?: "auto" | "book" | "donate" | "pay" | null; /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ subscription?: (string | components["schemas"]["subscription"]) | null; /** @@ -3549,12 +3549,12 @@ export interface components { * @description Payment schedule for the mandate. * @enum {string|null} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + payment_schedule?: "combined" | "interval" | "sporadic" | null; /** * @description Transaction type of the mandate. * @enum {string|null} */ - transaction_type?: "business" | "personal"; + transaction_type?: "business" | "personal" | null; }; /** CheckoutAcssDebitPaymentMethodOptions */ checkout_acss_debit_payment_method_options: { @@ -3700,7 +3700,7 @@ export interface components { * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. * @enum {string|null} */ - type?: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + type?: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer" | null; }; /** CheckoutCustomerBalancePaymentMethodOptions */ checkout_customer_balance_payment_method_options: { @@ -3709,7 +3709,7 @@ export interface components { * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. * @enum {string|null} */ - funding_type?: "bank_transfer"; + funding_type?: "bank_transfer" | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -4114,7 +4114,7 @@ export interface components { * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` * @enum {string|null} */ - reason?: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory"; + reason?: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory" | null; /** @description Refund related to this credit note. */ refund?: (string | components["schemas"]["refund"]) | null; /** @@ -4207,7 +4207,7 @@ export interface components { * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. * @enum {string|null} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_behavior?: "exclusive" | "inclusive" | "unspecified" | null; /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ tiers?: (components["schemas"]["price_tier"])[]; /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ @@ -4334,7 +4334,7 @@ export interface components { * @description Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. * @enum {string|null} */ - tax_exempt?: "exempt" | "none" | "reverse"; + tax_exempt?: "exempt" | "none" | "reverse" | null; /** * TaxIDsList * @description The customer's tax IDs. @@ -5756,7 +5756,7 @@ export interface components { * @description Type of the document. * @enum {string|null} */ - type?: "driving_license" | "id_card" | "passport"; + type?: "driving_license" | "id_card" | "passport" | null; }; /** GelatoDocumentReportError */ gelato_document_report_error: { @@ -5764,7 +5764,7 @@ export interface components { * @description A short machine-readable string giving the reason for the verification failure. * @enum {string|null} */ - code?: "document_expired" | "document_type_not_supported" | "document_unverified_other"; + code?: "document_expired" | "document_type_not_supported" | "document_unverified_other" | null; /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ reason?: string; }; @@ -5785,7 +5785,7 @@ export interface components { * @description Type of ID number. * @enum {string|null} */ - id_number_type?: "br_cpf" | "sg_nric" | "us_ssn"; + id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null; /** @description Last name. */ last_name?: string; /** @@ -5800,7 +5800,7 @@ export interface components { * @description A short machine-readable string giving the reason for the verification failure. * @enum {string|null} */ - code?: "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other"; + code?: "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" | null; /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ reason?: string; }; @@ -5840,7 +5840,7 @@ export interface components { * @description A short machine-readable string giving the reason for the verification failure. * @enum {string|null} */ - code?: "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" | "selfie_unverified_other"; + code?: "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" | "selfie_unverified_other" | null; /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ reason?: string; }; @@ -5866,7 +5866,7 @@ export interface components { * @description A short machine-readable string giving the reason for the verification or user-session failure. * @enum {string|null} */ - code?: "abandoned" | "consent_declined" | "country_not_supported" | "device_not_supported" | "document_expired" | "document_type_not_supported" | "document_unverified_other" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" | "selfie_unverified_other" | "under_supported_age"; + code?: "abandoned" | "consent_declined" | "country_not_supported" | "device_not_supported" | "document_expired" | "document_type_not_supported" | "document_unverified_other" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" | "selfie_unverified_other" | "under_supported_age" | null; /** @description A message that explains the reason for verification or user-session failure. */ reason?: string; }; @@ -5894,7 +5894,7 @@ export interface components { * @description The user's verified id number type. * @enum {string|null} */ - id_number_type?: "br_cpf" | "sg_nric" | "us_ssn"; + id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null; /** @description The user's verified last name. */ last_name?: string; }; @@ -6012,12 +6012,12 @@ export interface components { * @description Account holder type: individual or company. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** * @description Account type: checkings or savings. Defaults to checking if omitted. * @enum {string|null} */ - account_type?: "checking" | "savings"; + account_type?: "checking" | "savings" | null; /** @description Name of the bank associated with the bank account. */ bank_name?: string; /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ @@ -6095,7 +6095,7 @@ export interface components { * @description Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. * @enum {string|null} */ - billing_reason?: "automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "subscription_update" | "upcoming"; + billing_reason?: "automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "subscription_update" | "upcoming" | null; /** @description ID of the latest charge generated for this invoice, if any. */ charge?: (string | components["schemas"]["charge"]) | null; /** @@ -6128,7 +6128,7 @@ export interface components { * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. * @enum {string|null} */ - customer_tax_exempt?: "exempt" | "none" | "reverse"; + customer_tax_exempt?: "exempt" | "none" | "reverse" | null; /** @description The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. */ customer_tax_ids?: (components["schemas"]["invoices_resource_invoice_tax_id"])[]; /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -6236,7 +6236,7 @@ export interface components { * @description The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) * @enum {string|null} */ - status?: "deleted" | "draft" | "open" | "paid" | "uncollectible" | "void"; + status?: "deleted" | "draft" | "open" | "paid" | "uncollectible" | "void" | null; status_transitions: components["schemas"]["invoices_status_transitions"]; /** @description The subscription that this invoice was prepared for, if any. */ subscription?: (string | components["schemas"]["subscription"]) | null; @@ -6300,7 +6300,7 @@ export interface components { * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. * @enum {string|null} */ - amount_type?: "fixed" | "maximum"; + amount_type?: "fixed" | "maximum" | null; /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ description?: string; }; @@ -6319,7 +6319,7 @@ export interface components { * @description Transaction type of the mandate. * @enum {string|null} */ - transaction_type?: "business" | "personal"; + transaction_type?: "business" | "personal" | null; }; /** invoice_payment_method_options_bancontact */ invoice_payment_method_options_bancontact: { @@ -6336,7 +6336,7 @@ export interface components { * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ - request_three_d_secure?: "any" | "automatic"; + request_three_d_secure?: "any" | "automatic" | null; }; /** invoice_payment_method_options_customer_balance */ invoice_payment_method_options_customer_balance: { @@ -6345,7 +6345,7 @@ export interface components { * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. * @enum {string|null} */ - funding_type?: "bank_transfer"; + funding_type?: "bank_transfer" | null; }; /** invoice_payment_method_options_customer_balance_bank_transfer */ invoice_payment_method_options_customer_balance_bank_transfer: { @@ -6655,7 +6655,7 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: "design_rejected" | "lost" | "stolen"; + cancellation_reason?: "design_rejected" | "lost" | "stolen" | null; cardholder: components["schemas"]["issuing.cardholder"]; /** * Format: unix-time @@ -6697,7 +6697,7 @@ export interface components { * @description The reason why the previous card needed to be replaced. * @enum {string|null} */ - replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; + replacement_reason?: "damaged" | "expired" | "lost" | "stolen" | null; /** @description Where and how the card will be shipped. */ shipping?: components["schemas"]["issuing_card_shipping"] | null; spending_controls: components["schemas"]["issuing_card_authorization_controls"]; @@ -6916,7 +6916,7 @@ export interface components { * @description The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. * @enum {string|null} */ - wallet?: "apple_pay" | "google_pay" | "samsung_pay"; + wallet?: "apple_pay" | "google_pay" | "samsung_pay" | null; }; /** IssuingAuthorizationAmountDetails */ issuing_authorization_amount_details: { @@ -6985,7 +6985,9 @@ export interface components { * @description The reason for the approval or decline. * @enum {string} */ - reason: "account_disabled" | "card_active" | "card_inactive" | "cardholder_inactive" | "cardholder_verification_required" | "insufficient_funds" | "not_allowed" | "spending_controls" | "suspected_fraud" | "verification_failed" | "webhook_approved" | "webhook_declined" | "webhook_timeout"; + reason: "account_disabled" | "card_active" | "card_inactive" | "cardholder_inactive" | "cardholder_verification_required" | "insufficient_funds" | "not_allowed" | "spending_controls" | "suspected_fraud" | "verification_failed" | "webhook_approved" | "webhook_declined" | "webhook_error" | "webhook_timeout"; + /** @description If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field. */ + reason_message?: string; }; /** IssuingAuthorizationTreasury */ issuing_authorization_treasury: { @@ -7027,7 +7029,7 @@ export interface components { * @description Reason the card is ineligible for Apple Pay * @enum {string|null} */ - ineligible_reason?: "missing_agreement" | "missing_cardholder_contact" | "unsupported_region"; + ineligible_reason?: "missing_agreement" | "missing_cardholder_contact" | "unsupported_region" | null; }; /** IssuingCardAuthorizationControls */ issuing_card_authorization_controls: { @@ -7048,7 +7050,7 @@ export interface components { * @description Reason the card is ineligible for Google Pay * @enum {string|null} */ - ineligible_reason?: "missing_agreement" | "missing_cardholder_contact" | "unsupported_region"; + ineligible_reason?: "missing_agreement" | "missing_cardholder_contact" | "unsupported_region" | null; }; /** IssuingCardShipping */ issuing_card_shipping: { @@ -7057,7 +7059,7 @@ export interface components { * @description The delivery company that shipped a card. * @enum {string|null} */ - carrier?: "dhl" | "fedex" | "royal_mail" | "usps"; + carrier?: "dhl" | "fedex" | "royal_mail" | "usps" | null; /** @description Additional information that may be required for clearing customs. */ customs?: components["schemas"]["issuing_card_shipping_customs"] | null; /** @@ -7080,7 +7082,7 @@ export interface components { * @description The delivery status of the card. * @enum {string|null} */ - status?: "canceled" | "delivered" | "failure" | "pending" | "returned" | "shipped"; + status?: "canceled" | "delivered" | "failure" | "pending" | "returned" | "shipped" | null; /** @description A tracking number for a card shipment. */ tracking_number?: string; /** @description A link to the shipping carrier's site where you can view detailed information about a card shipment. */ @@ -7168,7 +7170,7 @@ export interface components { * @description If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. * @enum {string|null} */ - disabled_reason?: "listed" | "rejected.listed" | "under_review"; + disabled_reason?: "listed" | "rejected.listed" | "under_review" | null; /** @description Array of fields that need to be collected in order to verify and re-enable the cardholder. */ past_due?: ("company.tax_id" | "individual.dob.day" | "individual.dob.month" | "individual.dob.year" | "individual.first_name" | "individual.last_name" | "individual.verification.document")[]; }; @@ -7215,12 +7217,12 @@ export interface components { * @description Whether the product was a merchandise or service. * @enum {string|null} */ - product_type?: "merchandise" | "service"; + product_type?: "merchandise" | "service" | null; /** * @description Result of cardholder's attempt to return the product. * @enum {string|null} */ - return_status?: "merchant_rejected" | "successful"; + return_status?: "merchant_rejected" | "successful" | null; /** * Format: unix-time * @description Date when the product was returned or attempted to be returned. @@ -7281,7 +7283,7 @@ export interface components { * @description Result of cardholder's attempt to return the product. * @enum {string|null} */ - return_status?: "merchant_rejected" | "successful"; + return_status?: "merchant_rejected" | "successful" | null; /** * Format: unix-time * @description Date when the product was returned or attempted to be returned. @@ -7305,7 +7307,7 @@ export interface components { * @description Whether the product was a merchandise or service. * @enum {string|null} */ - product_type?: "merchandise" | "service"; + product_type?: "merchandise" | "service" | null; }; /** IssuingDisputeOtherEvidence */ issuing_dispute_other_evidence: { @@ -7319,7 +7321,7 @@ export interface components { * @description Whether the product was a merchandise or service. * @enum {string|null} */ - product_type?: "merchandise" | "service"; + product_type?: "merchandise" | "service" | null; }; /** IssuingDisputeServiceNotAsDescribedEvidence */ issuing_dispute_service_not_as_described_evidence: { @@ -7757,7 +7759,7 @@ export interface components { * @description Type of the mandate. * @enum {string|null} */ - type?: "off_session" | "on_session"; + type?: "off_session" | "on_session" | null; }; /** mandate_link */ mandate_link: Record; @@ -7773,7 +7775,7 @@ export interface components { * @description Frequency interval of each recurring payment. * @enum {string|null} */ - interval?: "day" | "month" | "week" | "year"; + interval?: "day" | "month" | "week" | "year" | null; /** @description Frequency indicator of each recurring payment. */ interval_count?: number; }; @@ -7956,7 +7958,7 @@ export interface components { * @description The status of the most recent automated tax calculation for this Order. * @enum {string|null} */ - status?: "complete" | "failed" | "requires_location_inputs"; + status?: "complete" | "failed" | "requires_location_inputs" | null; }; /** OrdersV2ResourceBillingDetails */ orders_v2_resource_billing_details: { @@ -7994,17 +7996,17 @@ export interface components { * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret * @enum {string|null} */ - billing_details?: "allow" | "disallow"; + billing_details?: "allow" | "disallow" | null; /** * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret * @enum {string|null} */ - promotion_codes?: "allow" | "disallow"; + promotion_codes?: "allow" | "disallow" | null; /** * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret * @enum {string|null} */ - shipping_details?: "allow" | "disallow"; + shipping_details?: "allow" | "disallow" | null; }; /** OrdersV2ResourcePayment */ orders_v2_resource_payment: { @@ -8016,7 +8018,7 @@ export interface components { * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. * @enum {string|null} */ - status?: "canceled" | "complete" | "not_required" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method"; + status?: "canceled" | "complete" | "not_required" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method" | null; }; /** OrdersV2ResourcePaymentMethodOptions */ orders_v2_resource_payment_method_options: { @@ -8148,12 +8150,12 @@ export interface components { * @description Account holder type: individual or company. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** * @description Account type: checkings or savings. Defaults to checking if omitted. * @enum {string|null} */ - account_type?: "checking" | "savings"; + account_type?: "checking" | "savings" | null; /** @description Name of the bank associated with the bank account. */ bank_name?: string; /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ @@ -8184,12 +8186,12 @@ export interface components { * @description Account holder type: individual or company. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** * @description Account type: checkings or savings. Defaults to checking if omitted. * @enum {string|null} */ - account_type?: "checking" | "savings"; + account_type?: "checking" | "savings" | null; /** @description Name of the bank associated with the bank account. */ bank_name?: string; /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ @@ -8291,7 +8293,7 @@ export interface components { * @description Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). * @enum {string|null} */ - cancellation_reason?: "abandoned" | "automatic" | "duplicate" | "failed_invoice" | "fraudulent" | "requested_by_customer" | "void_invoice"; + cancellation_reason?: "abandoned" | "automatic" | "duplicate" | "failed_invoice" | "fraudulent" | "requested_by_customer" | "void_invoice" | null; /** * @description Controls when the funds will be captured from the customer's account. * @enum {string} @@ -8382,7 +8384,7 @@ export interface components { * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). * @enum {string|null} */ - setup_future_usage?: "off_session" | "on_session"; + setup_future_usage?: "off_session" | "on_session" | null; /** @description Shipping information for this PaymentIntent. */ shipping?: components["schemas"]["shipping"] | null; /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ @@ -8592,7 +8594,7 @@ export interface components { * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. * @enum {string|null} */ - microdeposit_type?: "amounts" | "descriptor_code"; + microdeposit_type?: "amounts" | "descriptor_code" | null; }; /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8711,12 +8713,12 @@ export interface components { * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ - request_three_d_secure?: "any" | "automatic" | "challenge_only"; + request_three_d_secure?: "any" | "automatic" | "challenge_only" | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -8772,12 +8774,12 @@ export interface components { * @description Payment schedule for the mandate. * @enum {string|null} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + payment_schedule?: "combined" | "interval" | "sporadic" | null; /** * @description Transaction type of the mandate. * @enum {string|null} */ - transaction_type?: "business" | "personal"; + transaction_type?: "business" | "personal" | null; }; /** payment_intent_payment_method_options_mandate_options_sepa_debit */ payment_intent_payment_method_options_mandate_options_sepa_debit: Record; @@ -8977,12 +8979,12 @@ export interface components { * @description If set to `auto`, enables the collection of customer consent for promotional communications. * @enum {string|null} */ - promotions?: "auto" | "none"; + promotions?: "auto" | "none" | null; /** * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. * @enum {string|null} */ - terms_of_service?: "none" | "required"; + terms_of_service?: "none" | "required" | null; }; /** PaymentLinksResourcePaymentIntentData */ payment_links_resource_payment_intent_data: { @@ -8990,12 +8992,12 @@ export interface components { * @description Indicates when the funds will be captured from the customer's account. * @enum {string|null} */ - capture_method?: "automatic" | "manual"; + capture_method?: "automatic" | "manual" | null; /** * @description Indicates that you intend to make future payments with the payment method collected during checkout. * @enum {string|null} */ - setup_future_usage?: "off_session" | "on_session"; + setup_future_usage?: "off_session" | "on_session" | null; }; /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { @@ -9304,7 +9306,7 @@ export interface components { * @description Type of entity that holds the account. This can be either `individual` or `company`. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** @description Name of the bank associated with the bank account. */ bank_name?: string; /** @description Two-letter ISO code representing the country the bank account is located in. */ @@ -9379,7 +9381,7 @@ export interface components { * Can be one of `en`, `de`, `fr`, or `nl` * @enum {string|null} */ - preferred_language?: "de" | "en" | "fr" | "nl"; + preferred_language?: "de" | "en" | "fr" | "nl" | null; /** * @description Owner's verified full name. Values are verified or provided by Bancontact directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -9453,7 +9455,7 @@ export interface components { * One of `month`. * @enum {string|null} */ - interval?: "month"; + interval?: "month" | null; /** * @description Type of installment plan, one of `fixed_count`. * @enum {string} @@ -9503,7 +9505,7 @@ export interface components { * @description How card details were read in this transaction. * @enum {string|null} */ - read_method?: "contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2"; + read_method?: "contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2" | null; /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ receipt?: components["schemas"]["payment_method_details_card_present_receipt"] | null; }; @@ -9585,7 +9587,7 @@ export interface components { * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau" | null; /** * @description Owner's verified full name. Values are verified or provided by EPS directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -9629,12 +9631,12 @@ export interface components { * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. * @enum {string|null} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | null; /** * @description The Bank Identifier Code of the customer's bank. * @enum {string|null} */ - bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U"; + bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ generated_sepa_debit?: (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ @@ -9681,7 +9683,7 @@ export interface components { * @description How card details were read in this transaction. * @enum {string|null} */ - read_method?: "contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2"; + read_method?: "contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2" | null; /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ receipt?: components["schemas"]["payment_method_details_interac_present_receipt"] | null; }; @@ -9733,7 +9735,7 @@ export interface components { * @description The name of the convenience store chain where the payment was completed. * @enum {string|null} */ - chain?: "familymart" | "lawson" | "ministop" | "seicomart"; + chain?: "familymart" | "lawson" | "ministop" | "seicomart" | null; }; /** payment_method_details_link */ payment_method_details_link: Record; @@ -9755,7 +9757,7 @@ export interface components { * @description The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. * @enum {string|null} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank" | null; /** @description Unique reference for this Przelewy24 payment. */ reference?: string; /** @@ -9816,7 +9818,7 @@ export interface components { * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` * @enum {string|null} */ - preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null; /** * @description Owner's verified full name. Values are verified or provided by SOFORT directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -9831,12 +9833,12 @@ export interface components { * @description Account holder type: individual or company. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** * @description Account type: checkings or savings. Defaults to checking if omitted. * @enum {string|null} */ - account_type?: "checking" | "savings"; + account_type?: "checking" | "savings" | null; /** @description Name of the bank associated with the bank account. */ bank_name?: string; /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ @@ -9861,7 +9863,7 @@ export interface components { * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau" | null; }; /** payment_method_fpx */ payment_method_fpx: { @@ -9881,12 +9883,12 @@ export interface components { * @description The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. * @enum {string|null} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | null; /** * @description The Bank Identifier Code of the customer's bank, if the bank was provided. * @enum {string|null} */ - bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U"; + bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null; }; /** payment_method_interac_present */ payment_method_interac_present: Record; @@ -10054,7 +10056,7 @@ export interface components { * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. * @enum {string|null} */ - funding_type?: "bank_transfer"; + funding_type?: "bank_transfer" | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -10078,7 +10080,7 @@ export interface components { * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. * @enum {string|null} */ - type?: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + type?: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer" | null; }; /** payment_method_options_customer_balance_eu_bank_account */ payment_method_options_customer_balance_eu_bank_account: { @@ -10262,7 +10264,7 @@ export interface components { * @description Preferred language of the SOFORT authorization page that the customer is redirected to. * @enum {string|null} */ - preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -10281,7 +10283,7 @@ export interface components { * @description The client type that the end customer will pay from * @enum {string|null} */ - client?: "android" | "ios" | "web"; + client?: "android" | "ios" | "web" | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -10300,7 +10302,7 @@ export interface components { * @description The customer's bank, if provided. * @enum {string|null} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank" | null; }; /** payment_method_paynow */ payment_method_paynow: Record; @@ -10334,12 +10336,12 @@ export interface components { * @description Account holder type: individual or company. * @enum {string|null} */ - account_holder_type?: "company" | "individual"; + account_holder_type?: "company" | "individual" | null; /** * @description Account type: checkings or savings. Defaults to checking if omitted. * @enum {string|null} */ - account_type?: "checking" | "savings"; + account_type?: "checking" | "savings" | null; /** @description The name of the bank. */ bank_name?: string; /** @description The ID of the Financial Connections Account used to create the payment method. */ @@ -10386,7 +10388,7 @@ export interface components { * @description The status of the most recent automated tax calculation for this session. * @enum {string|null} */ - status?: "complete" | "failed" | "requires_location_inputs"; + status?: "complete" | "failed" | "requires_location_inputs" | null; }; /** PaymentPagesCheckoutSessionConsent */ payment_pages_checkout_session_consent: { @@ -10395,12 +10397,12 @@ export interface components { * from the merchant about this Checkout Session. * @enum {string|null} */ - promotions?: "opt_in" | "opt_out"; + promotions?: "opt_in" | "opt_out" | null; /** * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. * @enum {string|null} */ - terms_of_service?: "accepted"; + terms_of_service?: "accepted" | null; }; /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -10410,12 +10412,12 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: "auto" | "none"; + promotions?: "auto" | "none" | null; /** * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. * @enum {string|null} */ - terms_of_service?: "none" | "required"; + terms_of_service?: "none" | "required" | null; }; /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { @@ -10434,7 +10436,7 @@ export interface components { * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ - tax_exempt?: "exempt" | "none" | "reverse"; + tax_exempt?: "exempt" | "none" | "reverse" | null; /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: (components["schemas"]["payment_pages_checkout_session_tax_id"])[]; }; @@ -10725,7 +10727,7 @@ export interface components { * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. * @enum {string|null} */ - aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null; /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ amount?: number; /** @@ -10775,7 +10777,7 @@ export interface components { * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. * @enum {string|null} */ - tiers_mode?: "graduated" | "volume"; + tiers_mode?: "graduated" | "volume" | null; /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ transform_usage?: components["schemas"]["transform_usage"] | null; /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ @@ -10971,14 +10973,14 @@ export interface components { * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. * @enum {string|null} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_behavior?: "exclusive" | "inclusive" | "unspecified" | null; /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ tiers?: (components["schemas"]["price_tier"])[]; /** * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. * @enum {string|null} */ - tiers_mode?: "graduated" | "volume"; + tiers_mode?: "graduated" | "volume" | null; /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ transform_quantity?: components["schemas"]["transform_quantity"] | null; /** @@ -11243,7 +11245,7 @@ export interface components { * @description The status of the most recent automated tax calculation for this quote. * @enum {string|null} */ - status?: "complete" | "failed" | "requires_location_inputs"; + status?: "complete" | "failed" | "requires_location_inputs" | null; }; /** QuotesResourceComputed */ quotes_resource_computed: { @@ -11515,7 +11517,7 @@ export interface components { * @description Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. * @enum {string|null} */ - aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null; /** * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. * @enum {string} @@ -11581,7 +11583,7 @@ export interface components { * @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). * @enum {string|null} */ - reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer"; + reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | null; /** @description This is the transaction number that appears on email receipts sent for this refund. */ receipt_number?: string; /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ @@ -11733,7 +11735,7 @@ export interface components { * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. * @enum {string|null} */ - closed_reason?: "approved" | "disputed" | "redacted" | "refunded" | "refunded_as_fraud"; + closed_reason?: "approved" | "disputed" | "redacted" | "refunded" | "refunded_as_fraud" | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -11935,7 +11937,7 @@ export interface components { * Can be one of `en`, `de`, `fr`, or `nl` * @enum {string|null} */ - preferred_language?: "de" | "en" | "fr" | "nl"; + preferred_language?: "de" | "en" | "fr" | "nl" | null; /** * @description Owner's verified full name. Values are verified or provided by Bancontact directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -11962,12 +11964,12 @@ export interface components { * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. * @enum {string|null} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | null; /** * @description The Bank Identifier Code of the customer's bank. * @enum {string|null} */ - bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U"; + bic?: "ABNANL2A" | "ASNBNL21" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit?: (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ @@ -12005,7 +12007,7 @@ export interface components { * Can be one of `en`, `de`, `fr`, or `nl` * @enum {string|null} */ - preferred_language?: "de" | "en" | "fr" | "nl"; + preferred_language?: "de" | "en" | "fr" | "nl" | null; /** * @description Owner's verified full name. Values are verified or provided by Sofort directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -12052,7 +12054,7 @@ export interface components { * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} */ - cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer"; + cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer" | null; /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * @@ -12150,7 +12152,7 @@ export interface components { * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. * @enum {string|null} */ - microdeposit_type?: "amounts" | "descriptor_code"; + microdeposit_type?: "amounts" | "descriptor_code" | null; }; /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { @@ -12167,7 +12169,7 @@ export interface components { * @description Currency supported by the bank account * @enum {string|null} */ - currency?: "cad" | "usd"; + currency?: "cad" | "usd" | null; mandate_options?: components["schemas"]["setup_intent_payment_method_options_mandate_options_acss_debit"]; /** * @description Bank account verification method. @@ -12187,12 +12189,12 @@ export interface components { * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. * @enum {string|null} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ - request_three_d_secure?: "any" | "automatic" | "challenge_only"; + request_three_d_secure?: "any" | "automatic" | "challenge_only" | null; }; /** setup_intent_payment_method_options_card_mandate_options */ setup_intent_payment_method_options_card_mandate_options: { @@ -12246,12 +12248,12 @@ export interface components { * @description Payment schedule for the mandate. * @enum {string|null} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + payment_schedule?: "combined" | "interval" | "sporadic" | null; /** * @description Transaction type of the mandate. * @enum {string|null} */ - transaction_type?: "business" | "personal"; + transaction_type?: "business" | "personal" | null; }; /** setup_intent_payment_method_options_mandate_options_blik */ setup_intent_payment_method_options_mandate_options_blik: { @@ -12265,7 +12267,7 @@ export interface components { * @description Type of the mandate. * @enum {string|null} */ - type?: "off_session" | "on_session"; + type?: "off_session" | "on_session" | null; }; /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: Record; @@ -12338,7 +12340,7 @@ export interface components { * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. * @enum {string|null} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_behavior?: "exclusive" | "inclusive" | "unspecified" | null; /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: (string | components["schemas"]["tax_code"]) | null; /** @@ -13157,12 +13159,12 @@ export interface components { * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. * @enum {string|null} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ - request_three_d_secure?: "any" | "automatic"; + request_three_d_secure?: "any" | "automatic" | null; }; /** SubscriptionPendingInvoiceItemInterval */ subscription_pending_invoice_item_interval: { @@ -13293,14 +13295,14 @@ export interface components { * @description Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). * @enum {string|null} */ - billing_cycle_anchor?: "automatic" | "phase_start"; + billing_cycle_anchor?: "automatic" | "phase_start" | null; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ billing_thresholds?: components["schemas"]["subscription_billing_thresholds"] | null; /** * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. * @enum {string|null} */ - collection_method?: "charge_automatically" | "send_invoice"; + collection_method?: "charge_automatically" | "send_invoice" | null; /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: (string | components["schemas"]["coupon"] | components["schemas"]["deleted_coupon"]) | null; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -13360,7 +13362,7 @@ export interface components { * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. * @enum {string|null} */ - collection_method?: "charge_automatically" | "send_invoice"; + collection_method?: "charge_automatically" | "send_invoice" | null; /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components["schemas"]["payment_method"]) | null; /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ @@ -13426,7 +13428,7 @@ export interface components { * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. * @enum {string|null} */ - save_default_payment_method?: "off" | "on_subscription"; + save_default_payment_method?: "off" | "on_subscription" | null; }; /** * SubscriptionsResourcePendingUpdate @@ -13586,7 +13588,7 @@ export interface components { * @description The high-level tax type, such as `vat` or `sales_tax`. * @enum {string|null} */ - tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat"; + tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat" | null; }; /** * TerminalConfigurationConfiguration @@ -13866,23 +13868,23 @@ export interface components { * the issuing bank. * @enum {string|null} */ - authentication_flow?: "challenge" | "frictionless"; + authentication_flow?: "challenge" | "frictionless" | null; /** * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - result?: "attempt_acknowledged" | "authenticated" | "exempted" | "failed" | "not_supported" | "processing_error"; + result?: "attempt_acknowledged" | "authenticated" | "exempted" | "failed" | "not_supported" | "processing_error" | null; /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. * @enum {string|null} */ - result_reason?: "abandoned" | "bypassed" | "canceled" | "card_not_enrolled" | "network_not_supported" | "protocol_error" | "rejected"; + result_reason?: "abandoned" | "bypassed" | "canceled" | "card_not_enrolled" | "network_not_supported" | "protocol_error" | "rejected" | null; /** * @description The version of 3D Secure that was used. * @enum {string|null} */ - version?: "1.0.2" | "2.1.0" | "2.2.0"; + version?: "1.0.2" | "2.1.0" | "2.2.0" | null; }; /** three_d_secure_usage */ three_d_secure_usage: { @@ -14509,7 +14511,7 @@ export interface components { * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. * @enum {string|null} */ - failure_code?: "account_closed" | "account_frozen" | "other"; + failure_code?: "account_closed" | "account_frozen" | "other" | null; /** @description The FinancialAccount that received the funds. */ financial_account?: string; /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ @@ -14560,7 +14562,7 @@ export interface components { * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. * @enum {string|null} */ - failure_code?: "account_closed" | "account_frozen" | "insufficient_funds" | "other"; + failure_code?: "account_closed" | "account_frozen" | "insufficient_funds" | "other" | null; /** @description The FinancialAccount that funds were pulled from. */ financial_account?: string; /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ @@ -14805,12 +14807,12 @@ export interface components { * @description Restricts all inbound money movement. * @enum {string|null} */ - inbound_flows?: "restricted" | "unrestricted"; + inbound_flows?: "restricted" | "unrestricted" | null; /** * @description Restricts all outbound money movement. * @enum {string|null} */ - outbound_flows?: "restricted" | "unrestricted"; + outbound_flows?: "restricted" | "unrestricted" | null; }; /** TreasuryFinancialAccountsResourceStatusDetails */ treasury_financial_accounts_resource_status_details: { @@ -14846,7 +14848,7 @@ export interface components { * @description Represents what the user should do, if anything, to activate the Feature. * @enum {string|null} */ - resolution?: "contact_stripe" | "provide_information" | "remove_restriction"; + resolution?: "contact_stripe" | "provide_information" | "remove_restriction" | null; /** * @description The `platform_restrictions` that are restricting this Feature. * @enum {string} @@ -14983,7 +14985,7 @@ export interface components { * @description Set if a ReceivedCredit cannot be reversed. * @enum {string|null} */ - restricted_reason?: "already_reversed" | "deadline_passed" | "network_restricted" | "other" | "source_flow_restricted"; + restricted_reason?: "already_reversed" | "deadline_passed" | "network_restricted" | "other" | "source_flow_restricted" | null; }; /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ treasury_received_credits_resource_source_flows_details: { @@ -15031,7 +15033,7 @@ export interface components { * @description Set if a ReceivedDebit can't be reversed. * @enum {string|null} */ - restricted_reason?: "already_reversed" | "deadline_passed" | "network_restricted" | "other" | "source_flow_restricted"; + restricted_reason?: "already_reversed" | "deadline_passed" | "network_restricted" | "other" | "source_flow_restricted" | null; }; /** TreasuryReceivedDebitsResourceStatusTransitions */ treasury_received_debits_resource_status_transitions: { @@ -15230,8 +15232,11 @@ export interface components { pathItems: never; } +export type external = Record; + export interface operations { - "GetAccount": { + + GetAccount: { /** @description

Retrieves the details of an account.

*/ parameters?: { /** @description Specifies which fields in the response should be expanded. */ @@ -15240,7 +15245,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -15257,28 +15264,30 @@ export interface operations { }; }; }; - "PostAccountLinks": { + PostAccountLinks: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The identifier of the account to create an account link for. */ - account: string; - /** - * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. - * @enum {string} - */ - collect?: "currently_due" | "eventually_due"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. */ - refresh_url?: string; - /** @description The URL that the user will be redirected to upon leaving or completing the linked flow. */ - return_url?: string; - /** - * @description The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. - * @enum {string} - */ - type: "account_onboarding" | "account_update"; + content: { + "application/x-www-form-urlencoded": { + /** @description The identifier of the account to create an account link for. */ + account: string; + /** + * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. + * @enum {string} + */ + collect?: "currently_due" | "eventually_due"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. */ + refresh_url?: string; + /** @description The URL that the user will be redirected to upon leaving or completing the linked flow. */ + return_url?: string; + /** + * @description The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + * @enum {string} + */ + type: "account_onboarding" | "account_update"; + }; }; }; responses: { @@ -15296,7 +15305,7 @@ export interface operations { }; }; }; - "GetAccounts": { + GetAccounts: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -15317,7 +15326,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -15345,466 +15356,468 @@ export interface operations { }; }; }; - "PostAccounts": { + PostAccounts: { /** * @description

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

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string; - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string; - name?: string; - product_description?: string; - /** address_specs */ - support_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - support_email?: string; - support_phone?: string; - support_url?: string | ""; - url?: string; - }; - /** - * @description The business type. - * @enum {string} - */ - business_type?: "company" | "government_entity" | "individual" | "non_profit"; - /** - * capabilities_param - * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - */ - capabilities?: { - /** capability_param */ - acss_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - affirm_payments?: { - requested?: boolean; - }; - /** capability_param */ - afterpay_clearpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - au_becs_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - bacs_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - bancontact_payments?: { - requested?: boolean; - }; - /** capability_param */ - bank_transfer_payments?: { - requested?: boolean; - }; - /** capability_param */ - blik_payments?: { - requested?: boolean; - }; - /** capability_param */ - boleto_payments?: { - requested?: boolean; - }; - /** capability_param */ - card_issuing?: { - requested?: boolean; - }; - /** capability_param */ - card_payments?: { - requested?: boolean; - }; - /** capability_param */ - cartes_bancaires_payments?: { - requested?: boolean; - }; - /** capability_param */ - eps_payments?: { - requested?: boolean; - }; - /** capability_param */ - fpx_payments?: { - requested?: boolean; - }; - /** capability_param */ - giropay_payments?: { - requested?: boolean; - }; - /** capability_param */ - grabpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - ideal_payments?: { - requested?: boolean; - }; - /** capability_param */ - jcb_payments?: { - requested?: boolean; - }; - /** capability_param */ - klarna_payments?: { - requested?: boolean; - }; - /** capability_param */ - konbini_payments?: { - requested?: boolean; - }; - /** capability_param */ - legacy_payments?: { - requested?: boolean; - }; - /** capability_param */ - link_payments?: { - requested?: boolean; - }; - /** capability_param */ - oxxo_payments?: { - requested?: boolean; - }; - /** capability_param */ - p24_payments?: { - requested?: boolean; - }; - /** capability_param */ - paynow_payments?: { - requested?: boolean; - }; - /** capability_param */ - promptpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - sepa_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - sofort_payments?: { - requested?: boolean; - }; - /** capability_param */ - tax_reporting_us_1099_k?: { - requested?: boolean; - }; - /** capability_param */ - tax_reporting_us_1099_misc?: { - requested?: boolean; - }; - /** capability_param */ - transfers?: { - requested?: boolean; - }; - /** capability_param */ - treasury?: { - requested?: boolean; - }; - /** capability_param */ - us_bank_account_ach_payments?: { - requested?: boolean; - }; - }; - /** - * company_specs - * @description Information about the company or business. This field is available for any `business_type`. - */ - company?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - directors_provided?: boolean; - executives_provided?: boolean; - name?: string; - name_kana?: string; - name_kanji?: string; - owners_provided?: boolean; - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number; - ip?: string; - user_agent?: string; - }; - phone?: string; - registration_number?: string; - /** @enum {string} */ - structure?: "" | "free_zone_establishment" | "free_zone_llc" | "government_instrumentality" | "governmental_unit" | "incorporated_non_profit" | "limited_liability_partnership" | "llc" | "multi_member_llc" | "private_company" | "private_corporation" | "private_partnership" | "public_company" | "public_corporation" | "public_partnership" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" | "tax_exempt_government_instrumentality" | "unincorporated_association" | "unincorporated_non_profit"; - tax_id?: string; - tax_id_registrar?: string; - vat_id?: string; - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string; + name?: string; + product_description?: string; + /** address_specs */ + support_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - }; - }; - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ - country?: string; - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string; - /** - * documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - bank_account_ownership_verification?: { - files?: (string)[]; - }; - /** documents_param */ - company_license?: { - files?: (string)[]; - }; - /** documents_param */ - company_memorandum_of_association?: { - files?: (string)[]; - }; - /** documents_param */ - company_ministerial_decree?: { - files?: (string)[]; - }; - /** documents_param */ - company_registration_verification?: { - files?: (string)[]; - }; - /** documents_param */ - company_tax_id_verification?: { - files?: (string)[]; - }; - /** documents_param */ - proof_of_registration?: { - files?: (string)[]; - }; - }; - /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ - external_account?: string; - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: { - day: number; - month: number; - year: number; - } | ""; - email?: string; - first_name?: string; - first_name_kana?: string; - first_name_kanji?: string; - full_name_aliases?: (string)[] | ""; - gender?: string; - id_number?: string; - id_number_secondary?: string; - last_name?: string; - last_name_kana?: string; - last_name_kanji?: string; - maiden_name?: string; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - phone?: string; - /** @enum {string} */ - political_exposure?: "existing" | "none"; - /** address_specs */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - ssn_last_4?: string; - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + support_email?: string; + support_phone?: string; + support_url?: string | ""; + url?: string; + }; + /** + * @description The business type. + * @enum {string} + */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** + * capabilities_param + * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + */ + capabilities?: { + /** capability_param */ + acss_debit_payments?: { + requested?: boolean; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** capability_param */ + affirm_payments?: { + requested?: boolean; + }; + /** capability_param */ + afterpay_clearpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + au_becs_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + bacs_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + bancontact_payments?: { + requested?: boolean; + }; + /** capability_param */ + bank_transfer_payments?: { + requested?: boolean; + }; + /** capability_param */ + blik_payments?: { + requested?: boolean; + }; + /** capability_param */ + boleto_payments?: { + requested?: boolean; + }; + /** capability_param */ + card_issuing?: { + requested?: boolean; + }; + /** capability_param */ + card_payments?: { + requested?: boolean; + }; + /** capability_param */ + cartes_bancaires_payments?: { + requested?: boolean; + }; + /** capability_param */ + eps_payments?: { + requested?: boolean; + }; + /** capability_param */ + fpx_payments?: { + requested?: boolean; + }; + /** capability_param */ + giropay_payments?: { + requested?: boolean; + }; + /** capability_param */ + grabpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + ideal_payments?: { + requested?: boolean; + }; + /** capability_param */ + jcb_payments?: { + requested?: boolean; + }; + /** capability_param */ + klarna_payments?: { + requested?: boolean; + }; + /** capability_param */ + konbini_payments?: { + requested?: boolean; + }; + /** capability_param */ + legacy_payments?: { + requested?: boolean; + }; + /** capability_param */ + link_payments?: { + requested?: boolean; + }; + /** capability_param */ + oxxo_payments?: { + requested?: boolean; + }; + /** capability_param */ + p24_payments?: { + requested?: boolean; + }; + /** capability_param */ + paynow_payments?: { + requested?: boolean; + }; + /** capability_param */ + promptpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + sepa_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + sofort_payments?: { + requested?: boolean; + }; + /** capability_param */ + tax_reporting_us_1099_k?: { + requested?: boolean; + }; + /** capability_param */ + tax_reporting_us_1099_misc?: { + requested?: boolean; + }; + /** capability_param */ + transfers?: { + requested?: boolean; + }; + /** capability_param */ + treasury?: { + requested?: boolean; + }; + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean; }; }; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * settings_specs - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string; - logo?: string; - primary_color?: string; - secondary_color?: string; - }; - /** card_issuing_settings_specs */ - card_issuing?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { + /** + * company_specs + * @description Information about the company or business. This field is available for any `business_type`. + */ + company?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + /** company_ownership_declaration */ + ownership_declaration?: { /** Format: unix-time */ date?: number; ip?: string; user_agent?: string; }; - }; - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean; - cvc_failure?: boolean; + phone?: string; + registration_number?: string; + /** @enum {string} */ + structure?: "" | "free_zone_establishment" | "free_zone_llc" | "government_instrumentality" | "governmental_unit" | "incorporated_non_profit" | "limited_liability_partnership" | "llc" | "multi_member_llc" | "private_company" | "private_corporation" | "private_partnership" | "public_company" | "public_corporation" | "public_partnership" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" | "tax_exempt_government_instrumentality" | "unincorporated_association" | "unincorporated_non_profit"; + tax_id?: string; + tax_id_registrar?: string; + vat_id?: string; + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; - statement_descriptor_prefix?: string; - statement_descriptor_prefix_kana?: string | ""; - statement_descriptor_prefix_kanji?: string | ""; }; - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string; - statement_descriptor_kana?: string; - statement_descriptor_kanji?: string; + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ + country?: string; + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string; + /** + * documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + bank_account_ownership_verification?: { + files?: (string)[]; + }; + /** documents_param */ + company_license?: { + files?: (string)[]; + }; + /** documents_param */ + company_memorandum_of_association?: { + files?: (string)[]; + }; + /** documents_param */ + company_ministerial_decree?: { + files?: (string)[]; + }; + /** documents_param */ + company_registration_verification?: { + files?: (string)[]; + }; + /** documents_param */ + company_tax_id_verification?: { + files?: (string)[]; + }; + /** documents_param */ + proof_of_registration?: { + files?: (string)[]; + }; }; - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean; - /** transfer_schedule_specs */ - schedule?: { - delay_days?: "minimum" | number; - /** @enum {string} */ - interval?: "daily" | "manual" | "monthly" | "weekly"; - monthly_anchor?: number; - /** @enum {string} */ - weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ + external_account?: string; + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: { + day: number; + month: number; + year: number; + } | ""; + email?: string; + first_name?: string; + first_name_kana?: string; + first_name_kanji?: string; + full_name_aliases?: (string)[] | ""; + gender?: string; + id_number?: string; + id_number_secondary?: string; + last_name?: string; + last_name_kana?: string; + last_name_kanji?: string; + maiden_name?: string; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + phone?: string; + /** @enum {string} */ + political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + ssn_last_4?: string; + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; - statement_descriptor?: string; }; - /** treasury_settings_specs */ - treasury?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - user_agent?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * settings_specs + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + }; + /** card_issuing_settings_specs */ + card_issuing?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + }; + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + }; + statement_descriptor_prefix?: string; + statement_descriptor_prefix_kana?: string | ""; + statement_descriptor_prefix_kanji?: string | ""; + }; + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + }; + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean; + /** transfer_schedule_specs */ + schedule?: { + delay_days?: "minimum" | number; + /** @enum {string} */ + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + /** @enum {string} */ + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + }; + statement_descriptor?: string; + }; + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; }; }; + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + service_agreement?: string; + user_agent?: string; + }; + /** + * @description The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + * @enum {string} + */ + type?: "custom" | "express" | "standard"; }; - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - service_agreement?: string; - user_agent?: string; - }; - /** - * @description The type of Stripe account to create. May be one of `custom`, `express` or `standard`. - * @enum {string} - */ - type?: "custom" | "express" | "standard"; }; }; responses: { @@ -15822,7 +15835,7 @@ export interface operations { }; }; }; - "GetAccountsAccount": { + GetAccountsAccount: { /** @description

Retrieves the details of an account.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -15834,7 +15847,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -15851,7 +15866,7 @@ export interface operations { }; }; }; - "PostAccountsAccount": { + PostAccountsAccount: { /** * @description

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

* @@ -15863,438 +15878,440 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string; - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string; - name?: string; - product_description?: string; - /** address_specs */ - support_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - support_email?: string; - support_phone?: string; - support_url?: string | ""; - url?: string; - }; - /** - * @description The business type. - * @enum {string} - */ - business_type?: "company" | "government_entity" | "individual" | "non_profit"; - /** - * capabilities_param - * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - */ - capabilities?: { - /** capability_param */ - acss_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - affirm_payments?: { - requested?: boolean; - }; - /** capability_param */ - afterpay_clearpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - au_becs_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - bacs_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - bancontact_payments?: { - requested?: boolean; - }; - /** capability_param */ - bank_transfer_payments?: { - requested?: boolean; - }; - /** capability_param */ - blik_payments?: { - requested?: boolean; - }; - /** capability_param */ - boleto_payments?: { - requested?: boolean; - }; - /** capability_param */ - card_issuing?: { - requested?: boolean; - }; - /** capability_param */ - card_payments?: { - requested?: boolean; - }; - /** capability_param */ - cartes_bancaires_payments?: { - requested?: boolean; - }; - /** capability_param */ - eps_payments?: { - requested?: boolean; - }; - /** capability_param */ - fpx_payments?: { - requested?: boolean; - }; - /** capability_param */ - giropay_payments?: { - requested?: boolean; - }; - /** capability_param */ - grabpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - ideal_payments?: { - requested?: boolean; - }; - /** capability_param */ - jcb_payments?: { - requested?: boolean; - }; - /** capability_param */ - klarna_payments?: { - requested?: boolean; - }; - /** capability_param */ - konbini_payments?: { - requested?: boolean; - }; - /** capability_param */ - legacy_payments?: { - requested?: boolean; - }; - /** capability_param */ - link_payments?: { - requested?: boolean; - }; - /** capability_param */ - oxxo_payments?: { - requested?: boolean; - }; - /** capability_param */ - p24_payments?: { - requested?: boolean; - }; - /** capability_param */ - paynow_payments?: { - requested?: boolean; - }; - /** capability_param */ - promptpay_payments?: { - requested?: boolean; - }; - /** capability_param */ - sepa_debit_payments?: { - requested?: boolean; - }; - /** capability_param */ - sofort_payments?: { - requested?: boolean; - }; - /** capability_param */ - tax_reporting_us_1099_k?: { - requested?: boolean; - }; - /** capability_param */ - tax_reporting_us_1099_misc?: { - requested?: boolean; - }; - /** capability_param */ - transfers?: { - requested?: boolean; - }; - /** capability_param */ - treasury?: { - requested?: boolean; - }; - /** capability_param */ - us_bank_account_ach_payments?: { - requested?: boolean; - }; - }; - /** - * company_specs - * @description Information about the company or business. This field is available for any `business_type`. - */ - company?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - directors_provided?: boolean; - executives_provided?: boolean; - name?: string; - name_kana?: string; - name_kanji?: string; - owners_provided?: boolean; - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number; - ip?: string; - user_agent?: string; - }; - phone?: string; - registration_number?: string; - /** @enum {string} */ - structure?: "" | "free_zone_establishment" | "free_zone_llc" | "government_instrumentality" | "governmental_unit" | "incorporated_non_profit" | "limited_liability_partnership" | "llc" | "multi_member_llc" | "private_company" | "private_corporation" | "private_partnership" | "public_company" | "public_corporation" | "public_partnership" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" | "tax_exempt_government_instrumentality" | "unincorporated_association" | "unincorporated_non_profit"; - tax_id?: string; - tax_id_registrar?: string; - vat_id?: string; - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string; + name?: string; + product_description?: string; + /** address_specs */ + support_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - }; - }; - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string; - /** - * documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - bank_account_ownership_verification?: { - files?: (string)[]; - }; - /** documents_param */ - company_license?: { - files?: (string)[]; - }; - /** documents_param */ - company_memorandum_of_association?: { - files?: (string)[]; - }; - /** documents_param */ - company_ministerial_decree?: { - files?: (string)[]; - }; - /** documents_param */ - company_registration_verification?: { - files?: (string)[]; - }; - /** documents_param */ - company_tax_id_verification?: { - files?: (string)[]; - }; - /** documents_param */ - proof_of_registration?: { - files?: (string)[]; - }; - }; - /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ - external_account?: string; - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: { - day: number; - month: number; - year: number; - } | ""; - email?: string; - first_name?: string; - first_name_kana?: string; - first_name_kanji?: string; - full_name_aliases?: (string)[] | ""; - gender?: string; - id_number?: string; - id_number_secondary?: string; - last_name?: string; - last_name_kana?: string; - last_name_kanji?: string; - maiden_name?: string; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - phone?: string; - /** @enum {string} */ - political_exposure?: "existing" | "none"; - /** address_specs */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - ssn_last_4?: string; - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + support_email?: string; + support_phone?: string; + support_url?: string | ""; + url?: string; + }; + /** + * @description The business type. + * @enum {string} + */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** + * capabilities_param + * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + */ + capabilities?: { + /** capability_param */ + acss_debit_payments?: { + requested?: boolean; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** capability_param */ + affirm_payments?: { + requested?: boolean; + }; + /** capability_param */ + afterpay_clearpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + au_becs_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + bacs_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + bancontact_payments?: { + requested?: boolean; + }; + /** capability_param */ + bank_transfer_payments?: { + requested?: boolean; + }; + /** capability_param */ + blik_payments?: { + requested?: boolean; + }; + /** capability_param */ + boleto_payments?: { + requested?: boolean; + }; + /** capability_param */ + card_issuing?: { + requested?: boolean; + }; + /** capability_param */ + card_payments?: { + requested?: boolean; + }; + /** capability_param */ + cartes_bancaires_payments?: { + requested?: boolean; + }; + /** capability_param */ + eps_payments?: { + requested?: boolean; + }; + /** capability_param */ + fpx_payments?: { + requested?: boolean; + }; + /** capability_param */ + giropay_payments?: { + requested?: boolean; + }; + /** capability_param */ + grabpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + ideal_payments?: { + requested?: boolean; + }; + /** capability_param */ + jcb_payments?: { + requested?: boolean; + }; + /** capability_param */ + klarna_payments?: { + requested?: boolean; + }; + /** capability_param */ + konbini_payments?: { + requested?: boolean; + }; + /** capability_param */ + legacy_payments?: { + requested?: boolean; + }; + /** capability_param */ + link_payments?: { + requested?: boolean; + }; + /** capability_param */ + oxxo_payments?: { + requested?: boolean; + }; + /** capability_param */ + p24_payments?: { + requested?: boolean; + }; + /** capability_param */ + paynow_payments?: { + requested?: boolean; + }; + /** capability_param */ + promptpay_payments?: { + requested?: boolean; + }; + /** capability_param */ + sepa_debit_payments?: { + requested?: boolean; + }; + /** capability_param */ + sofort_payments?: { + requested?: boolean; + }; + /** capability_param */ + tax_reporting_us_1099_k?: { + requested?: boolean; + }; + /** capability_param */ + tax_reporting_us_1099_misc?: { + requested?: boolean; + }; + /** capability_param */ + transfers?: { + requested?: boolean; + }; + /** capability_param */ + treasury?: { + requested?: boolean; + }; + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean; }; }; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * settings_specs_update - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string; - logo?: string; - primary_color?: string; - secondary_color?: string; - }; - /** card_issuing_settings_specs */ - card_issuing?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { + /** + * company_specs + * @description Information about the company or business. This field is available for any `business_type`. + */ + company?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + /** company_ownership_declaration */ + ownership_declaration?: { /** Format: unix-time */ date?: number; ip?: string; user_agent?: string; }; - }; - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean; - cvc_failure?: boolean; + phone?: string; + registration_number?: string; + /** @enum {string} */ + structure?: "" | "free_zone_establishment" | "free_zone_llc" | "government_instrumentality" | "governmental_unit" | "incorporated_non_profit" | "limited_liability_partnership" | "llc" | "multi_member_llc" | "private_company" | "private_corporation" | "private_partnership" | "public_company" | "public_corporation" | "public_partnership" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" | "tax_exempt_government_instrumentality" | "unincorporated_association" | "unincorporated_non_profit"; + tax_id?: string; + tax_id_registrar?: string; + vat_id?: string; + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; - statement_descriptor_prefix?: string; - statement_descriptor_prefix_kana?: string | ""; - statement_descriptor_prefix_kanji?: string | ""; }; - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string; - statement_descriptor_kana?: string; - statement_descriptor_kanji?: string; + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string; + /** + * documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + bank_account_ownership_verification?: { + files?: (string)[]; + }; + /** documents_param */ + company_license?: { + files?: (string)[]; + }; + /** documents_param */ + company_memorandum_of_association?: { + files?: (string)[]; + }; + /** documents_param */ + company_ministerial_decree?: { + files?: (string)[]; + }; + /** documents_param */ + company_registration_verification?: { + files?: (string)[]; + }; + /** documents_param */ + company_tax_id_verification?: { + files?: (string)[]; + }; + /** documents_param */ + proof_of_registration?: { + files?: (string)[]; + }; }; - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean; - /** transfer_schedule_specs */ - schedule?: { - delay_days?: "minimum" | number; - /** @enum {string} */ - interval?: "daily" | "manual" | "monthly" | "weekly"; - monthly_anchor?: number; - /** @enum {string} */ - weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ + external_account?: string; + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: { + day: number; + month: number; + year: number; + } | ""; + email?: string; + first_name?: string; + first_name_kana?: string; + first_name_kanji?: string; + full_name_aliases?: (string)[] | ""; + gender?: string; + id_number?: string; + id_number_secondary?: string; + last_name?: string; + last_name_kana?: string; + last_name_kanji?: string; + maiden_name?: string; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + phone?: string; + /** @enum {string} */ + political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + ssn_last_4?: string; + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; - statement_descriptor?: string; }; - /** treasury_settings_specs */ - treasury?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - user_agent?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * settings_specs_update + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + }; + /** card_issuing_settings_specs */ + card_issuing?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + }; + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + }; + statement_descriptor_prefix?: string; + statement_descriptor_prefix_kana?: string | ""; + statement_descriptor_prefix_kanji?: string | ""; + }; + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + }; + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean; + /** transfer_schedule_specs */ + schedule?: { + delay_days?: "minimum" | number; + /** @enum {string} */ + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + /** @enum {string} */ + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + }; + statement_descriptor?: string; + }; + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; }; }; - }; - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - service_agreement?: string; - user_agent?: string; + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + service_agreement?: string; + user_agent?: string; + }; }; }; }; @@ -16313,7 +16330,7 @@ export interface operations { }; }; }; - "DeleteAccountsAccount": { + DeleteAccountsAccount: { /** * @description

With Connect, you can delete accounts you manage.

* @@ -16327,7 +16344,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16344,7 +16363,7 @@ export interface operations { }; }; }; - "PostAccountsAccountBankAccounts": { + PostAccountsAccountBankAccounts: { /** @description

Create an external account for a given account.

*/ parameters: { path: { @@ -16352,30 +16371,32 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -16394,7 +16415,7 @@ export interface operations { }; }; }; - "GetAccountsAccountBankAccountsId": { + GetAccountsAccountBankAccountsId: { /** @description

Retrieve a specified external account for a given account.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -16407,7 +16428,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16424,7 +16447,7 @@ export interface operations { }; }; }; - "PostAccountsAccountBankAccountsId": { + PostAccountsAccountBankAccountsId: { /** * @description

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

* @@ -16437,45 +16460,47 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: "" | "company" | "individual"; - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - /** @description City/District/Suburb/Town/Village. */ - address_city?: string; - /** @description Billing address country, if provided when creating card. */ - address_country?: string; - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** @description State/County/Province/Region. */ - address_state?: string; - /** @description ZIP or postal code. */ - address_zip?: string; - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Cardholder name. */ - name?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: "" | "company" | "individual"; + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + /** @description City/District/Suburb/Town/Village. */ + address_city?: string; + /** @description Billing address country, if provided when creating card. */ + address_country?: string; + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** @description State/County/Province/Region. */ + address_state?: string; + /** @description ZIP or postal code. */ + address_zip?: string; + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Cardholder name. */ + name?: string; + }; }; }; responses: { @@ -16493,7 +16518,7 @@ export interface operations { }; }; }; - "DeleteAccountsAccountBankAccountsId": { + DeleteAccountsAccountBankAccountsId: { /** @description

Delete a specified external account for a given account.

*/ parameters: { path: { @@ -16502,7 +16527,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16519,7 +16546,7 @@ export interface operations { }; }; }; - "GetAccountsAccountCapabilities": { + GetAccountsAccountCapabilities: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -16531,7 +16558,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16559,7 +16588,7 @@ export interface operations { }; }; }; - "GetAccountsAccountCapabilitiesCapability": { + GetAccountsAccountCapabilitiesCapability: { /** @description

Retrieves information about the specified Account Capability.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -16572,7 +16601,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16589,7 +16620,7 @@ export interface operations { }; }; }; - "PostAccountsAccountCapabilitiesCapability": { + PostAccountsAccountCapabilitiesCapability: { /** @description

Updates an existing Account Capability.

*/ parameters: { path: { @@ -16598,11 +16629,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ - requested?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ + requested?: boolean; + }; }; }; responses: { @@ -16620,7 +16653,7 @@ export interface operations { }; }; }; - "GetAccountsAccountExternalAccounts": { + GetAccountsAccountExternalAccounts: { /** @description

List external accounts for an account.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -16638,7 +16671,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16667,7 +16702,7 @@ export interface operations { }; }; }; - "PostAccountsAccountExternalAccounts": { + PostAccountsAccountExternalAccounts: { /** @description

Create an external account for a given account.

*/ parameters: { path: { @@ -16675,30 +16710,32 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -16717,7 +16754,7 @@ export interface operations { }; }; }; - "GetAccountsAccountExternalAccountsId": { + GetAccountsAccountExternalAccountsId: { /** @description

Retrieve a specified external account for a given account.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -16730,7 +16767,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16747,7 +16786,7 @@ export interface operations { }; }; }; - "PostAccountsAccountExternalAccountsId": { + PostAccountsAccountExternalAccountsId: { /** * @description

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

* @@ -16760,45 +16799,47 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: "" | "company" | "individual"; - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - /** @description City/District/Suburb/Town/Village. */ - address_city?: string; - /** @description Billing address country, if provided when creating card. */ - address_country?: string; - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** @description State/County/Province/Region. */ - address_state?: string; - /** @description ZIP or postal code. */ - address_zip?: string; - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Cardholder name. */ - name?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: "" | "company" | "individual"; + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + /** @description City/District/Suburb/Town/Village. */ + address_city?: string; + /** @description Billing address country, if provided when creating card. */ + address_country?: string; + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** @description State/County/Province/Region. */ + address_state?: string; + /** @description ZIP or postal code. */ + address_zip?: string; + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Cardholder name. */ + name?: string; + }; }; }; responses: { @@ -16816,7 +16857,7 @@ export interface operations { }; }; }; - "DeleteAccountsAccountExternalAccountsId": { + DeleteAccountsAccountExternalAccountsId: { /** @description

Delete a specified external account for a given account.

*/ parameters: { path: { @@ -16825,7 +16866,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16842,7 +16885,7 @@ export interface operations { }; }; }; - "PostAccountsAccountLoginLinks": { + PostAccountsAccountLoginLinks: { /** * @description

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

* @@ -16854,9 +16897,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -16874,7 +16919,7 @@ export interface operations { }; }; }; - "GetAccountsAccountPeople": { + GetAccountsAccountPeople: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -16899,7 +16944,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -16927,7 +16974,7 @@ export interface operations { }; }; }; - "PostAccountsAccountPeople": { + PostAccountsAccountPeople: { /** @description

Creates a new person.

*/ parameters: { path: { @@ -16935,147 +16982,149 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** @description The person's date of birth. */ - dob?: { - day: number; - month: number; - year: number; - } | ""; - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** documents_param */ - passport?: { - files?: (string)[]; + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - /** documents_param */ - visa?: { - files?: (string)[]; + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - }; - /** @description The person's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The person's first name. */ - first_name?: string; - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: (string)[] | ""; - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string; - /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number_secondary?: string; - /** @description The person's last name. */ - last_name?: string; - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** @description The person's maiden name. */ - maiden_name?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string; - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** @description The person's phone number. */ - phone?: string; - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string; - /** - * address_specs - * @description The person's registered address. - */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: number | ""; - representative?: boolean; - title?: string; - }; - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string; - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + /** @description The person's date of birth. */ + dob?: { + day: number; + month: number; + year: number; + } | ""; + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: (string)[]; + }; + /** documents_param */ + passport?: { + files?: (string)[]; + }; + /** documents_param */ + visa?: { + files?: (string)[]; + }; + }; + /** @description The person's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The person's first name. */ + first_name?: string; + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: (string)[] | ""; + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; + /** @description The person's last name. */ + last_name?: string; + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** @description The person's maiden name. */ + maiden_name?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string; + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** @description The person's phone number. */ + phone?: string; + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: number | ""; + representative?: boolean; + title?: string; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string; + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -17095,7 +17144,7 @@ export interface operations { }; }; }; - "GetAccountsAccountPeoplePerson": { + GetAccountsAccountPeoplePerson: { /** @description

Retrieves an existing person.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -17108,7 +17157,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17125,7 +17176,7 @@ export interface operations { }; }; }; - "PostAccountsAccountPeoplePerson": { + PostAccountsAccountPeoplePerson: { /** @description

Updates an existing person.

*/ parameters: { path: { @@ -17134,147 +17185,149 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** @description The person's date of birth. */ - dob?: { - day: number; - month: number; - year: number; - } | ""; - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** documents_param */ - passport?: { - files?: (string)[]; + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - /** documents_param */ - visa?: { - files?: (string)[]; + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - }; - /** @description The person's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The person's first name. */ - first_name?: string; - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: (string)[] | ""; - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string; - /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number_secondary?: string; - /** @description The person's last name. */ - last_name?: string; - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** @description The person's maiden name. */ - maiden_name?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string; - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** @description The person's phone number. */ - phone?: string; - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string; - /** - * address_specs - * @description The person's registered address. - */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: number | ""; - representative?: boolean; - title?: string; - }; - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string; - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + /** @description The person's date of birth. */ + dob?: { + day: number; + month: number; + year: number; + } | ""; + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: (string)[]; + }; + /** documents_param */ + passport?: { + files?: (string)[]; + }; + /** documents_param */ + visa?: { + files?: (string)[]; + }; + }; + /** @description The person's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The person's first name. */ + first_name?: string; + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: (string)[] | ""; + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; + /** @description The person's last name. */ + last_name?: string; + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** @description The person's maiden name. */ + maiden_name?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string; + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** @description The person's phone number. */ + phone?: string; + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: number | ""; + representative?: boolean; + title?: string; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string; + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -17294,7 +17347,7 @@ export interface operations { }; }; }; - "DeleteAccountsAccountPeoplePerson": { + DeleteAccountsAccountPeoplePerson: { /** @description

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

*/ parameters: { path: { @@ -17303,7 +17356,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17320,7 +17375,7 @@ export interface operations { }; }; }; - "GetAccountsAccountPersons": { + GetAccountsAccountPersons: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -17345,7 +17400,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17373,7 +17430,7 @@ export interface operations { }; }; }; - "PostAccountsAccountPersons": { + PostAccountsAccountPersons: { /** @description

Creates a new person.

*/ parameters: { path: { @@ -17381,147 +17438,149 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** @description The person's date of birth. */ - dob?: { - day: number; - month: number; - year: number; - } | ""; - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** documents_param */ - passport?: { - files?: (string)[]; + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - /** documents_param */ - visa?: { - files?: (string)[]; + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - }; - /** @description The person's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The person's first name. */ - first_name?: string; - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: (string)[] | ""; - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string; - /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number_secondary?: string; - /** @description The person's last name. */ - last_name?: string; - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** @description The person's maiden name. */ - maiden_name?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string; - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** @description The person's phone number. */ - phone?: string; - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string; - /** - * address_specs - * @description The person's registered address. - */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: number | ""; - representative?: boolean; - title?: string; - }; - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string; - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + /** @description The person's date of birth. */ + dob?: { + day: number; + month: number; + year: number; + } | ""; + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: (string)[]; + }; + /** documents_param */ + passport?: { + files?: (string)[]; + }; + /** documents_param */ + visa?: { + files?: (string)[]; + }; + }; + /** @description The person's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The person's first name. */ + first_name?: string; + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: (string)[] | ""; + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; + /** @description The person's last name. */ + last_name?: string; + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** @description The person's maiden name. */ + maiden_name?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string; + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** @description The person's phone number. */ + phone?: string; + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: number | ""; + representative?: boolean; + title?: string; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string; + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -17541,7 +17600,7 @@ export interface operations { }; }; }; - "GetAccountsAccountPersonsPerson": { + GetAccountsAccountPersonsPerson: { /** @description

Retrieves an existing person.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -17554,7 +17613,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17571,7 +17632,7 @@ export interface operations { }; }; }; - "PostAccountsAccountPersonsPerson": { + PostAccountsAccountPersonsPerson: { /** @description

Updates an existing person.

*/ parameters: { path: { @@ -17580,147 +17641,149 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** @description The person's date of birth. */ - dob?: { - day: number; - month: number; - year: number; - } | ""; - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** documents_param */ - passport?: { - files?: (string)[]; + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - /** documents_param */ - visa?: { - files?: (string)[]; + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; }; - }; - /** @description The person's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The person's first name. */ - first_name?: string; - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: (string)[] | ""; - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string; - /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number_secondary?: string; - /** @description The person's last name. */ - last_name?: string; - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** @description The person's maiden name. */ - maiden_name?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string; - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** @description The person's phone number. */ - phone?: string; - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string; - /** - * address_specs - * @description The person's registered address. - */ - registered_address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: number | ""; - representative?: boolean; - title?: string; - }; - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string; - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + /** @description The person's date of birth. */ + dob?: { + day: number; + month: number; + year: number; + } | ""; + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: (string)[]; + }; + /** documents_param */ + passport?: { + files?: (string)[]; + }; + /** documents_param */ + visa?: { + files?: (string)[]; + }; + }; + /** @description The person's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The person's first name. */ + first_name?: string; + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: (string)[] | ""; + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; + /** @description The person's last name. */ + last_name?: string; + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** @description The person's maiden name. */ + maiden_name?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string; + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** @description The person's phone number. */ + phone?: string; + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: number | ""; + representative?: boolean; + title?: string; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string; + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -17740,7 +17803,7 @@ export interface operations { }; }; }; - "DeleteAccountsAccountPersonsPerson": { + DeleteAccountsAccountPersonsPerson: { /** @description

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

*/ parameters: { path: { @@ -17749,7 +17812,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17766,7 +17831,7 @@ export interface operations { }; }; }; - "PostAccountsAccountReject": { + PostAccountsAccountReject: { /** * @description

With Connect, you may flag accounts as suspicious.

* @@ -17778,11 +17843,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ - reason: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ + reason: string; + }; }; }; responses: { @@ -17800,7 +17867,7 @@ export interface operations { }; }; }; - "GetApplePayDomains": { + GetApplePayDomains: { /** @description

List apple pay domains.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -17816,7 +17883,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17844,13 +17913,15 @@ export interface operations { }; }; }; - "PostApplePayDomains": { + PostApplePayDomains: { /** @description

Create an apple pay domain.

*/ requestBody: { - "application/x-www-form-urlencoded": { - domain_name: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + domain_name: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -17868,7 +17939,7 @@ export interface operations { }; }; }; - "GetApplePayDomainsDomain": { + GetApplePayDomainsDomain: { /** @description

Retrieve an apple pay domain.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -17880,7 +17951,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17897,7 +17970,7 @@ export interface operations { }; }; }; - "DeleteApplePayDomainsDomain": { + DeleteApplePayDomainsDomain: { /** @description

Delete an apple pay domain.

*/ parameters: { path: { @@ -17905,7 +17978,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17922,7 +17997,7 @@ export interface operations { }; }; }; - "GetApplicationFees": { + GetApplicationFees: { /** @description

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

*/ parameters?: { /** @description Only return application fees for the charge specified by this charge ID. */ @@ -17945,7 +18020,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -17973,7 +18050,7 @@ export interface operations { }; }; }; - "GetApplicationFeesFeeRefundsId": { + GetApplicationFeesFeeRefundsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -17986,7 +18063,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18003,7 +18082,7 @@ export interface operations { }; }; }; - "PostApplicationFeesFeeRefundsId": { + PostApplicationFeesFeeRefundsId: { /** * @description

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

* @@ -18016,13 +18095,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -18040,7 +18121,7 @@ export interface operations { }; }; }; - "GetApplicationFeesId": { + GetApplicationFeesId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -18052,7 +18133,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18069,18 +18152,20 @@ export interface operations { }; }; }; - "PostApplicationFeesIdRefund": { + PostApplicationFeesIdRefund: { parameters: { path: { id: string; }; }; requestBody?: { - "application/x-www-form-urlencoded": { - amount?: number; - directive?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + amount?: number; + directive?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -18098,7 +18183,7 @@ export interface operations { }; }; }; - "GetApplicationFeesIdRefunds": { + GetApplicationFeesIdRefunds: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -18116,7 +18201,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18145,7 +18232,7 @@ export interface operations { }; }; }; - "PostApplicationFeesIdRefunds": { + PostApplicationFeesIdRefunds: { /** * @description

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

@@ -18163,14 +18250,16 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ - amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -18189,7 +18278,7 @@ export interface operations { }; }; }; - "GetAppsSecrets": { + GetAppsSecrets: { /** @description

List all secrets stored on the given scope.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -18210,7 +18299,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18238,29 +18329,31 @@ export interface operations { }; }; }; - "PostAppsSecrets": { + PostAppsSecrets: { /** @description

Create or replace a secret in the secret store.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. - */ - expires_at?: number; - /** @description A name for the secret that's unique within the scope. */ - name: string; - /** @description The plaintext secret value to be stored. */ - payload: string; - /** - * scope_param - * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - */ - scope: { - /** @enum {string} */ - type: "account" | "user"; - user?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number; + /** @description A name for the secret that's unique within the scope. */ + name: string; + /** @description The plaintext secret value to be stored. */ + payload: string; + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; }; }; }; @@ -18279,22 +18372,24 @@ export interface operations { }; }; }; - "PostAppsSecretsDelete": { + PostAppsSecretsDelete: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A name for the secret that's unique within the scope. */ - name: string; - /** - * scope_param - * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - */ - scope: { - /** @enum {string} */ - type: "account" | "user"; - user?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A name for the secret that's unique within the scope. */ + name: string; + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; }; }; }; @@ -18313,7 +18408,7 @@ export interface operations { }; }; }; - "GetAppsSecretsFind": { + GetAppsSecretsFind: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -18330,7 +18425,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18347,7 +18444,7 @@ export interface operations { }; }; }; - "GetBalance": { + GetBalance: { /** * @description

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

@@ -18359,7 +18456,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18376,7 +18475,7 @@ export interface operations { }; }; }; - "GetBalanceHistory": { + GetBalanceHistory: { /** * @description

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

* @@ -18409,7 +18508,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18437,7 +18538,7 @@ export interface operations { }; }; }; - "GetBalanceHistoryId": { + GetBalanceHistoryId: { /** * @description

Retrieves the balance transaction with the given ID.

* @@ -18453,7 +18554,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18470,7 +18573,7 @@ export interface operations { }; }; }; - "GetBalanceTransactions": { + GetBalanceTransactions: { /** * @description

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

* @@ -18503,7 +18606,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18531,7 +18636,7 @@ export interface operations { }; }; }; - "GetBalanceTransactionsId": { + GetBalanceTransactionsId: { /** * @description

Retrieves the balance transaction with the given ID.

* @@ -18547,7 +18652,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18564,7 +18671,7 @@ export interface operations { }; }; }; - "GetBillingPortalConfigurations": { + GetBillingPortalConfigurations: { /** @description

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

*/ parameters?: { /** @description Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). */ @@ -18583,7 +18690,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18611,80 +18720,82 @@ export interface operations { }; }; }; - "PostBillingPortalConfigurations": { + PostBillingPortalConfigurations: { /** @description

Creates a configuration that describes the functionality and behavior of a PortalSession

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * business_profile_create_param - * @description The business information shown to customers in the portal. - */ - business_profile: { - headline?: string; - privacy_policy_url?: string; - terms_of_service_url?: string; - }; - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: string | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * features_creation_param - * @description Information about the features available in the portal. - */ - features: { - /** customer_update_creation_param */ - customer_update?: { - allowed_updates?: (("address" | "email" | "phone" | "shipping" | "tax_id")[]) | ""; - enabled: boolean; - }; - /** invoice_list_param */ - invoice_history?: { - enabled: boolean; - }; - /** payment_method_update_param */ - payment_method_update?: { - enabled: boolean; - }; - /** subscription_cancel_creation_param */ - subscription_cancel?: { - /** subscription_cancellation_reason_creation_param */ - cancellation_reason?: { + content: { + "application/x-www-form-urlencoded": { + /** + * business_profile_create_param + * @description The business information shown to customers in the portal. + */ + business_profile: { + headline?: string; + privacy_policy_url?: string; + terms_of_service_url?: string; + }; + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ + default_return_url?: string | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * features_creation_param + * @description Information about the features available in the portal. + */ + features: { + /** customer_update_creation_param */ + customer_update?: { + allowed_updates?: (("address" | "email" | "phone" | "shipping" | "tax_id")[]) | ""; enabled: boolean; - options: (("customer_service" | "low_quality" | "missing_features" | "other" | "switched_service" | "too_complex" | "too_expensive" | "unused")[]) | ""; }; - enabled: boolean; - /** @enum {string} */ - mode?: "at_period_end" | "immediately"; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - }; - /** subscription_pause_param */ - subscription_pause?: { - enabled?: boolean; + /** invoice_list_param */ + invoice_history?: { + enabled: boolean; + }; + /** payment_method_update_param */ + payment_method_update?: { + enabled: boolean; + }; + /** subscription_cancel_creation_param */ + subscription_cancel?: { + /** subscription_cancellation_reason_creation_param */ + cancellation_reason?: { + enabled: boolean; + options: (("customer_service" | "low_quality" | "missing_features" | "other" | "switched_service" | "too_complex" | "too_expensive" | "unused")[]) | ""; + }; + enabled: boolean; + /** @enum {string} */ + mode?: "at_period_end" | "immediately"; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; + /** subscription_pause_param */ + subscription_pause?: { + enabled?: boolean; + }; + /** subscription_update_creation_param */ + subscription_update?: { + default_allowed_updates: (("price" | "promotion_code" | "quantity")[]) | ""; + enabled: boolean; + products: ({ + prices: (string)[]; + product: string; + })[] | ""; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; }; - /** subscription_update_creation_param */ - subscription_update?: { - default_allowed_updates: (("price" | "promotion_code" | "quantity")[]) | ""; + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { enabled: boolean; - products: ({ - prices: (string)[]; - product: string; - })[] | ""; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; }; - }; - /** - * login_page_create_param - * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - */ - login_page?: { - enabled: boolean; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -18703,7 +18814,7 @@ export interface operations { }; }; }; - "GetBillingPortalConfigurationsConfiguration": { + GetBillingPortalConfigurationsConfiguration: { /** @description

Retrieves a configuration that describes the functionality of the customer portal.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -18715,7 +18826,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18732,7 +18845,7 @@ export interface operations { }; }; }; - "PostBillingPortalConfigurationsConfiguration": { + PostBillingPortalConfigurationsConfiguration: { /** @description

Updates a configuration that describes the functionality of the customer portal.

*/ parameters: { path: { @@ -18740,80 +18853,82 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the configuration is active and can be used to create portal sessions. */ - active?: boolean; - /** - * business_profile_update_param - * @description The business information shown to customers in the portal. - */ - business_profile?: { - headline?: string; - privacy_policy_url?: string | ""; - terms_of_service_url?: string | ""; - }; - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: string | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * features_updating_param - * @description Information about the features available in the portal. - */ - features?: { - /** customer_update_updating_param */ - customer_update?: { - allowed_updates?: (("address" | "email" | "phone" | "shipping" | "tax_id")[]) | ""; - enabled?: boolean; - }; - /** invoice_list_param */ - invoice_history?: { - enabled: boolean; - }; - /** payment_method_update_param */ - payment_method_update?: { - enabled: boolean; - }; - /** subscription_cancel_updating_param */ - subscription_cancel?: { - /** subscription_cancellation_reason_updating_param */ - cancellation_reason?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the configuration is active and can be used to create portal sessions. */ + active?: boolean; + /** + * business_profile_update_param + * @description The business information shown to customers in the portal. + */ + business_profile?: { + headline?: string; + privacy_policy_url?: string | ""; + terms_of_service_url?: string | ""; + }; + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ + default_return_url?: string | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * features_updating_param + * @description Information about the features available in the portal. + */ + features?: { + /** customer_update_updating_param */ + customer_update?: { + allowed_updates?: (("address" | "email" | "phone" | "shipping" | "tax_id")[]) | ""; + enabled?: boolean; + }; + /** invoice_list_param */ + invoice_history?: { enabled: boolean; - options?: (("customer_service" | "low_quality" | "missing_features" | "other" | "switched_service" | "too_complex" | "too_expensive" | "unused")[]) | ""; }; - enabled?: boolean; - /** @enum {string} */ - mode?: "at_period_end" | "immediately"; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - }; - /** subscription_pause_param */ - subscription_pause?: { - enabled?: boolean; - }; - /** subscription_update_updating_param */ - subscription_update?: { - default_allowed_updates?: (("price" | "promotion_code" | "quantity")[]) | ""; - enabled?: boolean; - products?: ({ - prices: (string)[]; - product: string; - })[] | ""; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** payment_method_update_param */ + payment_method_update?: { + enabled: boolean; + }; + /** subscription_cancel_updating_param */ + subscription_cancel?: { + /** subscription_cancellation_reason_updating_param */ + cancellation_reason?: { + enabled: boolean; + options?: (("customer_service" | "low_quality" | "missing_features" | "other" | "switched_service" | "too_complex" | "too_expensive" | "unused")[]) | ""; + }; + enabled?: boolean; + /** @enum {string} */ + mode?: "at_period_end" | "immediately"; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; + /** subscription_pause_param */ + subscription_pause?: { + enabled?: boolean; + }; + /** subscription_update_updating_param */ + subscription_update?: { + default_allowed_updates?: (("price" | "promotion_code" | "quantity")[]) | ""; + enabled?: boolean; + products?: ({ + prices: (string)[]; + product: string; + })[] | ""; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; }; + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; }; - /** - * login_page_update_param - * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - */ - login_page?: { - enabled: boolean; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; }; }; responses: { @@ -18831,25 +18946,27 @@ export interface operations { }; }; }; - "PostBillingPortalSessions": { + PostBillingPortalSessions: { /** @description

Creates a session of the customer portal.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. */ - configuration?: string; - /** @description The ID of an existing customer. */ - customer: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. - * @enum {string} - */ - locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IE" | "en-IN" | "en-NZ" | "en-SG" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; - /** @description The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ - on_behalf_of?: string; - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. */ + configuration?: string; + /** @description The ID of an existing customer. */ + customer: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + * @enum {string} + */ + locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IE" | "en-IN" | "en-NZ" | "en-SG" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; + /** @description The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ + on_behalf_of?: string; + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. */ + return_url?: string; + }; }; }; responses: { @@ -18867,7 +18984,7 @@ export interface operations { }; }; }; - "GetCharges": { + GetCharges: { /** @description

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

*/ parameters?: { /** @description Only return charges for the customer specified by this customer ID. */ @@ -18894,7 +19011,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -18922,98 +19041,100 @@ export interface operations { }; }; }; - "PostCharges": { + PostCharges: { /** @description

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

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

Search for charges you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -19051,7 +19172,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19080,7 +19203,7 @@ export interface operations { }; }; }; - "GetChargesCharge": { + GetChargesCharge: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -19092,7 +19215,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19109,7 +19234,7 @@ export interface operations { }; }; }; - "PostChargesCharge": { + PostChargesCharge: { /** @description

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

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

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

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

Retrieve a dispute for a specified charge.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -19241,7 +19370,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19258,55 +19389,57 @@ export interface operations { }; }; }; - "PostChargesChargeDispute": { + PostChargesChargeDispute: { parameters: { path: { charge: string; }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string; - billing_address?: string; - cancellation_policy?: string; - cancellation_policy_disclosure?: string; - cancellation_rebuttal?: string; - customer_communication?: string; - customer_email_address?: string; - customer_name?: string; - customer_purchase_ip?: string; - customer_signature?: string; - duplicate_charge_documentation?: string; - duplicate_charge_explanation?: string; - duplicate_charge_id?: string; - product_description?: string; - receipt?: string; - refund_policy?: string; - refund_policy_disclosure?: string; - refund_refusal_explanation?: string; - service_date?: string; - service_documentation?: string; - shipping_address?: string; - shipping_carrier?: string; - shipping_date?: string; - shipping_documentation?: string; - shipping_tracking_number?: string; - uncategorized_file?: string; - uncategorized_text?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string; + billing_address?: string; + cancellation_policy?: string; + cancellation_policy_disclosure?: string; + cancellation_rebuttal?: string; + customer_communication?: string; + customer_email_address?: string; + customer_name?: string; + customer_purchase_ip?: string; + customer_signature?: string; + duplicate_charge_documentation?: string; + duplicate_charge_explanation?: string; + duplicate_charge_id?: string; + product_description?: string; + receipt?: string; + refund_policy?: string; + refund_policy_disclosure?: string; + refund_refusal_explanation?: string; + service_date?: string; + service_documentation?: string; + shipping_address?: string; + shipping_carrier?: string; + shipping_date?: string; + shipping_documentation?: string; + shipping_tracking_number?: string; + uncategorized_file?: string; + uncategorized_text?: string; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean; }; }; responses: { @@ -19324,16 +19457,18 @@ export interface operations { }; }; }; - "PostChargesChargeDisputeClose": { + PostChargesChargeDisputeClose: { parameters: { path: { charge: string; }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -19351,7 +19486,7 @@ export interface operations { }; }; }; - "PostChargesChargeRefund": { + PostChargesChargeRefund: { /** * @description

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

* @@ -19371,20 +19506,22 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - instructions_email?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - payment_intent?: string; - /** @enum {string} */ - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { + amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + instructions_email?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + payment_intent?: string; + /** @enum {string} */ + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; responses: { @@ -19402,7 +19539,7 @@ export interface operations { }; }; }; - "GetChargesChargeRefunds": { + GetChargesChargeRefunds: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -19420,7 +19557,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19449,7 +19588,7 @@ export interface operations { }; }; }; - "PostChargesChargeRefunds": { + PostChargesChargeRefunds: { /** @description

Create a refund.

*/ parameters: { path: { @@ -19457,31 +19596,33 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A positive integer representing how much to refund. */ - amount?: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description Customer whose customer balance to refund from. */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Address to send refund email, use customer email if not specified */ - instructions_email?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * @description Origin of the refund - * @enum {string} - */ - origin?: "customer_balance"; - payment_intent?: string; - /** @enum {string} */ - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer representing how much to refund. */ + amount?: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Customer whose customer balance to refund from. */ + customer?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: "customer_balance"; + payment_intent?: string; + /** @enum {string} */ + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; responses: { @@ -19499,7 +19640,7 @@ export interface operations { }; }; }; - "GetChargesChargeRefundsRefund": { + GetChargesChargeRefundsRefund: { /** @description

Retrieves the details of an existing refund.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -19512,7 +19653,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19529,7 +19672,7 @@ export interface operations { }; }; }; - "PostChargesChargeRefundsRefund": { + PostChargesChargeRefundsRefund: { /** @description

Update a specified refund.

*/ parameters: { path: { @@ -19538,12 +19681,14 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -19561,7 +19706,7 @@ export interface operations { }; }; }; - "GetCheckoutSessions": { + GetCheckoutSessions: { /** @description

Returns a list of Checkout Sessions.

*/ parameters?: { /** @description Only return the Checkout Sessions for the Customer specified. */ @@ -19586,7 +19731,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -19614,527 +19761,529 @@ export interface operations { }; }; }; - "PostCheckoutSessions": { + PostCheckoutSessions: { /** @description

Creates a Session object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * after_expiration_params - * @description Configure actions after a Checkout Session has expired. - */ - after_expiration?: { - /** recovery_params */ - recovery?: { - allow_promotion_codes?: boolean; - enabled: boolean; - }; - }; - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean; - /** - * automatic_tax_params - * @description Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Specify whether Checkout should collect the customer's billing address. - * @enum {string} - */ - billing_address_collection?: "auto" | "required"; - /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string; - /** - * @description A unique string to reference the Checkout Session. This can be a - * customer ID, a cart ID, or similar, and can be used to reconcile the - * session with your internal systems. - */ - client_reference_id?: string; - /** - * consent_collection_params - * @description Configure fields for the Checkout Session to gather active consent from customers. - */ - consent_collection?: { - /** @enum {string} */ - promotions?: "auto" | "none"; - /** @enum {string} */ - terms_of_service?: "none" | "required"; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** - * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card - * payment method will be used to prefill the email, name, card details, and billing address - * on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - * will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. - * - * If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. - * If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. - * - * If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow. - * - * You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. - */ - customer?: string; - /** - * @description Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. - * - * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout - * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - * - * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) - * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. - * - * Can only be set in `payment` and `setup` mode. - * @enum {string} - */ - customer_creation?: "always" | "if_required"; - /** - * @description If provided, this value will be used when the Customer object is created. - * If not provided, customers will be asked to enter their email address. - * Use this parameter to prefill customer data if you already have an email - * on file. To access information about the customer once a session is - * complete, use the `customer` field. - */ - customer_email?: string; - /** - * customer_update_params - * @description Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. - */ - customer_update?: { - /** @enum {string} */ - address?: "auto" | "never"; - /** @enum {string} */ - name?: "auto" | "never"; - /** @enum {string} */ - shipping?: "auto" | "never"; - }; - /** @description The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. */ - discounts?: ({ - coupon?: string; - promotion_code?: string; - })[]; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. - */ - expires_at?: number; - /** - * @description A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - * - * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. - */ - line_items?: ({ - /** adjustable_quantity_params */ - adjustable_quantity?: { + content: { + "application/x-www-form-urlencoded": { + /** + * after_expiration_params + * @description Configure actions after a Checkout Session has expired. + */ + after_expiration?: { + /** recovery_params */ + recovery?: { + allow_promotion_codes?: boolean; enabled: boolean; - maximum?: number; - minimum?: number; }; - dynamic_tax_rates?: (string)[]; - price?: string; - /** price_data_with_product_data */ - price_data?: { - currency: string; - product?: string; - /** product_data */ - product_data?: { - description?: string; - images?: (string)[]; - metadata?: { - [key: string]: string | undefined; - }; - name: string; - tax_code?: string; + }; + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean; + /** + * automatic_tax_params + * @description Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Specify whether Checkout should collect the customer's billing address. + * @enum {string} + */ + billing_address_collection?: "auto" | "required"; + /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string; + /** + * @description A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * session with your internal systems. + */ + client_reference_id?: string; + /** + * consent_collection_params + * @description Configure fields for the Checkout Session to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: "auto" | "none"; + /** @enum {string} */ + terms_of_service?: "none" | "required"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** + * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card + * payment method will be used to prefill the email, name, card details, and billing address + * on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + * will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + * + * If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + * If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + * + * If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow. + * + * You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + */ + customer?: string; + /** + * @description Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + * + * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + * + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + * + * Can only be set in `payment` and `setup` mode. + * @enum {string} + */ + customer_creation?: "always" | "if_required"; + /** + * @description If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once a session is + * complete, use the `customer` field. + */ + customer_email?: string; + /** + * customer_update_params + * @description Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + */ + customer_update?: { + /** @enum {string} */ + address?: "auto" | "never"; + /** @enum {string} */ + name?: "auto" | "never"; + /** @enum {string} */ + shipping?: "auto" | "never"; + }; + /** @description The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. */ + discounts?: ({ + coupon?: string; + promotion_code?: string; + })[]; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + */ + expires_at?: number; + /** + * @description A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + * + * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + * + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + */ + line_items?: ({ + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean; + maximum?: number; + minimum?: number; }; - /** recurring_adhoc */ - recurring?: { + dynamic_tax_rates?: (string)[]; + price?: string; + /** price_data_with_product_data */ + price_data?: { + currency: string; + product?: string; + /** product_data */ + product_data?: { + description?: string; + images?: (string)[]; + metadata?: { + [key: string]: string | undefined; + }; + name: string; + tax_code?: string; + }; + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[]; - })[]; - /** - * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - * @enum {string} - */ - locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-GB" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * @description The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. - * @enum {string} - */ - mode?: "payment" | "setup" | "subscription"; - /** - * payment_intent_data_params - * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - */ - payment_intent_data?: { - application_fee_amount?: number; - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - description?: string; + quantity?: number; + tax_rates?: (string)[]; + })[]; + /** + * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + * @enum {string} + */ + locale?: "auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-GB" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW"; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - on_behalf_of?: string; - receipt_email?: string; - /** @enum {string} */ - setup_future_usage?: "off_session" | "on_session"; - /** shipping */ - shipping?: { - /** address */ - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; + /** + * @description The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + * @enum {string} + */ + mode?: "payment" | "setup" | "subscription"; + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + application_fee_amount?: number; + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + description?: string; + metadata?: { + [key: string]: string | undefined; }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }; - statement_descriptor?: string; - statement_descriptor_suffix?: string; - /** transfer_data_params */ - transfer_data?: { - amount?: number; - destination: string; - }; - transfer_group?: string; - }; - /** - * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. - * This may occur if the Checkout Session includes a free trial or a discount. - * - * Can only be set in `subscription` mode. - * - * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - * @enum {string} - */ - payment_method_collection?: "always" | "if_required"; - /** - * payment_method_options_param - * @description Payment-method-specific configuration. - */ - payment_method_options?: { - /** payment_method_options_param */ - acss_debit?: { + on_behalf_of?: string; + receipt_email?: string; /** @enum {string} */ - currency?: "cad" | "usd"; - /** mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - default_for?: ("invoice" | "subscription")[]; - interval_description?: string; + setup_future_usage?: "off_session" | "on_session"; + /** shipping */ + shipping?: { + /** address */ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + /** transfer_data_params */ + transfer_data?: { + amount?: number; + destination: string; + }; + transfer_group?: string; + }; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; + /** + * payment_method_options_param + * @description Payment-method-specific configuration. + */ + payment_method_options?: { + /** payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: "cad" | "usd"; + /** mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + default_for?: ("invoice" | "subscription")[]; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + setup_future_usage?: "none" | "off_session" | "on_session"; /** @enum {string} */ - transaction_type?: "business" | "personal"; + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }; - /** payment_method_options_param */ - affirm?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - afterpay_clearpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - alipay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - au_becs_debit?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - bacs_debit?: { - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - }; - /** payment_method_options_param */ - bancontact?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - boleto?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - }; - /** payment_method_options_param */ - card?: { - /** installments_param */ - installments?: { - enabled?: boolean; + /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: "none"; }; - /** @enum {string} */ - setup_future_usage?: "off_session" | "on_session"; - statement_descriptor_suffix_kana?: string; - statement_descriptor_suffix_kanji?: string; - }; - /** payment_method_options_param */ - customer_balance?: { - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + boleto?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + setup_future_usage?: "off_session" | "on_session"; + statement_descriptor_suffix_kana?: string; + statement_descriptor_suffix_kanji?: string; }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - eps?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - fpx?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - giropay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - grabpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - ideal?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - klarna?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - konbini?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - }; - /** payment_method_options_param */ - paynow?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - }; - /** payment_method_options_param */ - pix?: { - expires_after_seconds?: number; - }; - /** payment_method_options_param */ - sepa_debit?: { - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - }; - /** payment_method_options_param */ - sofort?: { - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - us_bank_account?: { - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number; + }; + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + }; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant"; + }; + /** payment_method_options_param */ + wechat_pay?: { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; }; - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant"; }; - /** payment_method_options_param */ - wechat_pay?: { - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; + /** + * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * + * Read more about the supported payment methods and their requirements in our [payment + * method details guide](/docs/payments/checkout/payment-methods). + * + * If multiple payment methods are passed, Checkout will dynamically reorder them to + * prioritize the most relevant payment methods based on the customer's location and + * other characteristics. + */ + payment_method_types?: ("acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]; + /** + * phone_number_collection_params + * @description Controls phone number collection settings for the session. + * + * We recommend that you review your privacy policy and check with your legal contacts + * before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + */ + phone_number_collection?: { + enabled: boolean; }; - }; - /** - * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - * - * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - * It is required in `setup` mode. - * - * Read more about the supported payment methods and their requirements in our [payment - * method details guide](/docs/payments/checkout/payment-methods). - * - * If multiple payment methods are passed, Checkout will dynamically reorder them to - * prioritize the most relevant payment methods based on the customer's location and - * other characteristics. - */ - payment_method_types?: ("acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]; - /** - * phone_number_collection_params - * @description Controls phone number collection settings for the session. - * - * We recommend that you review your privacy policy and check with your legal contacts - * before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). - */ - phone_number_collection?: { - enabled: boolean; - }; - /** - * setup_intent_data_param - * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - */ - setup_intent_data?: { - description?: string; - metadata?: { - [key: string]: string | undefined; + /** + * setup_intent_data_param + * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + */ + setup_intent_data?: { + description?: string; + metadata?: { + [key: string]: string | undefined; + }; + on_behalf_of?: string; }; - on_behalf_of?: string; - }; - /** - * shipping_address_collection_params - * @description When set, provides configuration for Checkout to collect a shipping address from a customer. - */ - shipping_address_collection?: { - allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; - }; - /** @description The shipping rate options to apply to this Session. */ - shipping_options?: ({ - shipping_rate?: string; - /** method_params */ - shipping_rate_data?: { - /** delivery_estimate */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + /** + * shipping_address_collection_params + * @description When set, provides configuration for Checkout to collect a shipping address from a customer. + */ + shipping_address_collection?: { + allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; + }; + /** @description The shipping rate options to apply to this Session. */ + shipping_options?: ({ + shipping_rate?: string; + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; }; - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + display_name: string; + /** fixed_amount */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: ({ + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }) | undefined; + }; }; - }; - display_name: string; - /** fixed_amount */ - fixed_amount?: { - amount: number; - currency: string; - currency_options?: { - [key: string]: ({ - amount: number; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - }) | undefined; + metadata?: { + [key: string]: string | undefined; }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_code?: string; + /** @enum {string} */ + type?: "fixed_amount"; }; - metadata?: { - [key: string]: string | undefined; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tax_code?: string; - /** @enum {string} */ - type?: "fixed_amount"; + })[]; + /** + * @description Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + * @enum {string} + */ + submit_type?: "auto" | "book" | "donate" | "pay"; + /** + * subscription_data_params + * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + */ + subscription_data?: { + application_fee_percent?: number; + default_tax_rates?: (string)[]; + description?: string; + metadata?: { + [key: string]: string | undefined; }; - })[]; - /** - * @description Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - * in `subscription` or `setup` mode. - * @enum {string} - */ - submit_type?: "auto" | "book" | "donate" | "pay"; - /** - * subscription_data_params - * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - */ - subscription_data?: { - application_fee_percent?: number; - default_tax_rates?: (string)[]; - description?: string; - metadata?: { - [key: string]: string | undefined; - }; - on_behalf_of?: string; - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number; - destination: string; + on_behalf_of?: string; + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number; + destination: string; + }; + /** Format: unix-time */ + trial_end?: number; + trial_period_days?: number; + }; + /** + * @description The URL to which Stripe should send customers when payment or setup + * is complete. + * If you’d like to use information from the successful Checkout Session on your page, + * read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + */ + success_url: string; + /** + * tax_id_collection_params + * @description Controls tax ID collection settings for the session. + */ + tax_id_collection?: { + enabled: boolean; }; - /** Format: unix-time */ - trial_end?: number; - trial_period_days?: number; - }; - /** - * @description The URL to which Stripe should send customers when payment or setup - * is complete. - * If you’d like to use information from the successful Checkout Session on your page, - * read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - */ - success_url: string; - /** - * tax_id_collection_params - * @description Controls tax ID collection settings for the session. - */ - tax_id_collection?: { - enabled: boolean; }; }; }; @@ -20153,7 +20302,7 @@ export interface operations { }; }; }; - "GetCheckoutSessionsSession": { + GetCheckoutSessionsSession: { /** @description

Retrieves a Session object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -20165,7 +20314,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20182,7 +20333,7 @@ export interface operations { }; }; }; - "PostCheckoutSessionsSessionExpire": { + PostCheckoutSessionsSessionExpire: { /** * @description

A Session can be expired when it is in one of these statuses: open

* @@ -20194,9 +20345,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -20214,7 +20367,7 @@ export interface operations { }; }; }; - "GetCheckoutSessionsSessionLineItems": { + GetCheckoutSessionsSessionLineItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -20232,7 +20385,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20261,7 +20416,7 @@ export interface operations { }; }; }; - "GetCountrySpecs": { + GetCountrySpecs: { /** @description

Lists all Country Spec objects available in the API.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -20276,7 +20431,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20304,7 +20461,7 @@ export interface operations { }; }; }; - "GetCountrySpecsCountry": { + GetCountrySpecsCountry: { /** @description

Returns a Country Spec for a given Country code.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -20316,7 +20473,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20333,7 +20492,7 @@ export interface operations { }; }; }; - "GetCoupons": { + GetCoupons: { /** @description

Returns a list of your coupons.

*/ parameters?: { /** @description A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ @@ -20355,7 +20514,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20383,57 +20544,59 @@ export interface operations { }; }; }; - "PostCoupons": { + PostCoupons: { /** * @description

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

* *

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

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ - amount_off?: number; - /** - * applies_to_params - * @description A hash containing directions for what this Coupon will apply discounts to. - */ - applies_to?: { - products?: (string)[]; - }; - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ - currency?: string; - /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ - currency_options?: { - [key: string]: { - amount_off: number; - } | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ + amount_off?: number; + /** + * applies_to_params + * @description A hash containing directions for what this Coupon will apply discounts to. + */ + applies_to?: { + products?: (string)[]; + }; + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ + currency?: string; + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number; + } | undefined; + }; + /** + * @description Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + * @enum {string} + */ + duration?: "forever" | "once" | "repeating"; + /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ + duration_in_months?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ + id?: string; + /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ + max_redemptions?: number; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string; + /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ + percent_off?: number; + /** + * Format: unix-time + * @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + */ + redeem_by?: number; }; - /** - * @description Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - * @enum {string} - */ - duration?: "forever" | "once" | "repeating"; - /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ - duration_in_months?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ - id?: string; - /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ - max_redemptions?: number; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string; - /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ - percent_off?: number; - /** - * Format: unix-time - * @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. - */ - redeem_by?: number; }; }; responses: { @@ -20451,7 +20614,7 @@ export interface operations { }; }; }; - "GetCouponsCoupon": { + GetCouponsCoupon: { /** @description

Retrieves the coupon with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -20463,7 +20626,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20480,7 +20645,7 @@ export interface operations { }; }; }; - "PostCouponsCoupon": { + PostCouponsCoupon: { /** @description

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

*/ parameters: { path: { @@ -20488,21 +20653,23 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ - currency_options?: { - [key: string]: { - amount_off: number; - } | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number; + } | undefined; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string; }; }; responses: { @@ -20520,7 +20687,7 @@ export interface operations { }; }; }; - "DeleteCouponsCoupon": { + DeleteCouponsCoupon: { /** @description

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

*/ parameters: { path: { @@ -20528,7 +20695,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20545,7 +20714,7 @@ export interface operations { }; }; }; - "GetCreditNotes": { + GetCreditNotes: { /** @description

Returns a list of credit notes.

*/ parameters?: { /** @description Only return credit notes for the customer specified by this customer ID. */ @@ -20564,7 +20733,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20592,7 +20763,7 @@ export interface operations { }; }; }; - "PostCreditNotes": { + PostCreditNotes: { /** * @description

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result @@ -20610,45 +20781,47 @@ export interface operations { * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ - amount?: number; - /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description ID of the invoice. */ - invoice: string; - /** @description Line items that make up the credit note. */ - lines?: ({ - amount?: number; - description?: string; - invoice_line_item?: string; - quantity?: number; - tax_rates?: (string)[] | ""; - /** @enum {string} */ - type: "custom_line_item" | "invoice_line_item"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - })[]; - /** @description The credit note's memo appears on the credit note PDF. */ - memo?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ + amount?: number; + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description ID of the invoice. */ + invoice: string; + /** @description Line items that make up the credit note. */ + lines?: ({ + amount?: number; + description?: string; + invoice_line_item?: string; + quantity?: number; + tax_rates?: (string)[] | ""; + /** @enum {string} */ + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + })[]; + /** @description The credit note's memo appears on the credit note PDF. */ + memo?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number; + /** + * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + * @enum {string} + */ + reason?: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory"; + /** @description ID of an existing refund to link this credit note to. */ + refund?: string; + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number; }; - /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number; - /** - * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - * @enum {string} - */ - reason?: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory"; - /** @description ID of an existing refund to link this credit note to. */ - refund?: string; - /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number; }; }; responses: { @@ -20666,7 +20839,7 @@ export interface operations { }; }; }; - "GetCreditNotesPreview": { + GetCreditNotesPreview: { /** @description

Get a preview of a credit note without creating it.

*/ parameters: { /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ @@ -20708,7 +20881,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20725,7 +20900,7 @@ export interface operations { }; }; }; - "GetCreditNotesPreviewLines": { + GetCreditNotesPreviewLines: { /** @description

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

*/ parameters: { /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ @@ -20773,7 +20948,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20802,7 +20979,7 @@ export interface operations { }; }; }; - "GetCreditNotesCreditNoteLines": { + GetCreditNotesCreditNoteLines: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -20820,7 +20997,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20849,7 +21028,7 @@ export interface operations { }; }; }; - "GetCreditNotesId": { + GetCreditNotesId: { /** @description

Retrieves the credit note object with the given identifier.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -20861,7 +21040,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20878,7 +21059,7 @@ export interface operations { }; }; }; - "PostCreditNotesId": { + PostCreditNotesId: { /** @description

Updates an existing credit note.

*/ parameters: { path: { @@ -20886,14 +21067,16 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Credit note memo. */ - memo?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Credit note memo. */ + memo?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -20912,7 +21095,7 @@ export interface operations { }; }; }; - "PostCreditNotesIdVoid": { + PostCreditNotesIdVoid: { /** @description

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

*/ parameters: { path: { @@ -20920,9 +21103,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -20940,7 +21125,7 @@ export interface operations { }; }; }; - "GetCustomers": { + GetCustomers: { /** @description

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

*/ parameters?: { /** @description A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. */ @@ -20965,7 +21150,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -20993,107 +21180,109 @@ export interface operations { }; }; }; - "PostCustomers": { + PostCustomers: { /** @description

Creates a new customer object.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The customer's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number; - /** - * cash_balance_param - * @description Balance information and default balance settings for this customer. - */ - cash_balance?: { - /** balance_settings_param */ - settings?: { - /** @enum {string} */ - reconciliation_mode?: "automatic" | "manual"; - }; - }; - coupon?: string; - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string; - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string; - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: ({ - name: string; - value: string; - })[] | ""; - default_payment_method?: string; - footer?: string; - rendering_options?: ({ - /** @enum {string} */ - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; - }) | ""; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The customer's full name or business name. */ - name?: string; - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number; - payment_method?: string; - /** @description The customer's phone number. */ - phone?: string; - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: (string)[]; - /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ - promotion_code?: string; - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: { - /** optional_fields_address */ - address: { + content: { + "application/x-www-form-urlencoded": { + /** @description The customer's address. */ + address?: { city?: string; country?: string; line1?: string; line2?: string; postal_code?: string; state?: string; + } | ""; + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number; + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; }; - name: string; + coupon?: string; + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: ({ + name: string; + value: string; + })[] | ""; + default_payment_method?: string; + footer?: string; + rendering_options?: ({ + /** @enum {string} */ + amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; + }) | ""; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The customer's full name or business name. */ + name?: string; + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + payment_method?: string; + /** @description The customer's phone number. */ phone?: string; - } | ""; - source?: string; - /** - * tax_param - * @description Tax details about the customer. - */ - tax?: { - ip_address?: string | ""; + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: (string)[]; + /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ + promotion_code?: string; + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } | ""; + source?: string; + /** + * tax_param + * @description Tax details about the customer. + */ + tax?: { + ip_address?: string | ""; + }; + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + /** @description The customer's tax IDs. */ + tax_id_data?: ({ + /** @enum {string} */ + type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; + value: string; + })[]; + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string; }; - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; - /** @description The customer's tax IDs. */ - tax_id_data?: ({ - /** @enum {string} */ - type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; - value: string; - })[]; - /** @description ID of the test clock to attach to the customer. */ - test_clock?: string; }; }; responses: { @@ -21111,7 +21300,7 @@ export interface operations { }; }; }; - "GetCustomersSearch": { + GetCustomersSearch: { /** * @description

Search for customers you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -21131,7 +21320,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21160,7 +21351,7 @@ export interface operations { }; }; }; - "GetCustomersCustomer": { + GetCustomersCustomer: { /** @description

Retrieves a Customer object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -21172,7 +21363,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21189,7 +21382,7 @@ export interface operations { }; }; }; - "PostCustomersCustomer": { + PostCustomersCustomer: { /** * @description

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

* @@ -21201,140 +21394,142 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The customer's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number; - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: ({ - address_city?: string; - address_country?: string; - address_line1?: string; - address_line2?: string; - address_state?: string; - address_zip?: string; - cvc?: string; - exp_month: number; - exp_year: number; - metadata?: { - [key: string]: string | undefined; - }; - name?: string; - number: string; - /** @enum {string} */ - object?: "card"; - }) | string; - /** - * cash_balance_param - * @description Balance information and default balance settings for this customer. - */ - cash_balance?: { - /** balance_settings_param */ - settings?: { - /** @enum {string} */ - reconciliation_mode?: "automatic" | "manual"; - }; - }; - coupon?: string; - /** @description ID of Alipay account to make the customer's new default for invoice payments. */ - default_alipay_account?: string; - /** @description ID of bank account to make the customer's new default for invoice payments. */ - default_bank_account?: string; - /** @description ID of card to make the customer's new default for invoice payments. */ - default_card?: string; - /** - * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - * - * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - * - * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - */ - default_source?: string; - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string; - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string; - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: ({ - name: string; - value: string; - })[] | ""; - default_payment_method?: string; - footer?: string; - rendering_options?: ({ - /** @enum {string} */ - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; - }) | ""; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The customer's full name or business name. */ - name?: string; - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number; - /** @description The customer's phone number. */ - phone?: string; - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: (string)[]; - /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ - promotion_code?: string; - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: { - /** optional_fields_address */ - address: { + content: { + "application/x-www-form-urlencoded": { + /** @description The customer's address. */ + address?: { city?: string; country?: string; line1?: string; line2?: string; postal_code?: string; state?: string; + } | ""; + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number; + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: ({ + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { + [key: string]: string | undefined; + }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + }) | string; + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; }; - name: string; + coupon?: string; + /** @description ID of Alipay account to make the customer's new default for invoice payments. */ + default_alipay_account?: string; + /** @description ID of bank account to make the customer's new default for invoice payments. */ + default_bank_account?: string; + /** @description ID of card to make the customer's new default for invoice payments. */ + default_card?: string; + /** + * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + * + * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + * + * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + */ + default_source?: string; + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: ({ + name: string; + value: string; + })[] | ""; + default_payment_method?: string; + footer?: string; + rendering_options?: ({ + /** @enum {string} */ + amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; + }) | ""; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The customer's full name or business name. */ + name?: string; + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + /** @description The customer's phone number. */ phone?: string; - } | ""; - source?: string; - /** - * tax_param - * @description Tax details about the customer. - */ - tax?: { - ip_address?: string | ""; + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: (string)[]; + /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ + promotion_code?: string; + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } | ""; + source?: string; + /** + * tax_param + * @description Tax details about the customer. + */ + tax?: { + ip_address?: string | ""; + }; + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; }; - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; }; }; responses: { @@ -21352,7 +21547,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomer": { + DeleteCustomersCustomer: { /** @description

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

*/ parameters: { path: { @@ -21360,7 +21555,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21377,7 +21574,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerBalanceTransactions": { + GetCustomersCustomerBalanceTransactions: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -21395,7 +21592,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21424,7 +21623,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerBalanceTransactions": { + PostCustomersCustomerBalanceTransactions: { /** @description

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

*/ parameters: { path: { @@ -21432,19 +21631,21 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. */ - currency: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -21462,7 +21663,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerBalanceTransactionsTransaction": { + GetCustomersCustomerBalanceTransactionsTransaction: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -21475,7 +21676,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21492,7 +21695,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerBalanceTransactionsTransaction": { + PostCustomersCustomerBalanceTransactionsTransaction: { /** @description

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

*/ parameters: { path: { @@ -21501,15 +21704,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -21527,7 +21732,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerBankAccounts": { + GetCustomersCustomerBankAccounts: { /** * @deprecated * @description

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

@@ -21548,7 +21753,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21577,7 +21784,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerBankAccounts": { + PostCustomersCustomerBankAccounts: { /** * @description

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

* @@ -21591,48 +21798,50 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: ({ - address_city?: string; - address_country?: string; - address_line1?: string; - address_line2?: string; - address_state?: string; - address_zip?: string; - cvc?: string; - exp_month: number; - exp_year: number; + content: { + "application/x-www-form-urlencoded": { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: ({ + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { + [key: string]: string | undefined; + }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + }) | string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - name?: string; - number: string; - /** @enum {string} */ - object?: "card"; - }) | string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; }; - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string; }; }; responses: { @@ -21650,7 +21859,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerBankAccountsId": { + GetCustomersCustomerBankAccountsId: { /** * @deprecated * @description

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

@@ -21666,7 +21875,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21683,7 +21894,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerBankAccountsId": { + PostCustomersCustomerBankAccountsId: { /** @description

Update a specified source for a given customer.

*/ parameters: { path: { @@ -21692,52 +21903,54 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: "company" | "individual"; - /** @description City/District/Suburb/Town/Village. */ - address_city?: string; - /** @description Billing address country, if provided when creating card. */ - address_country?: string; - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** @description State/County/Province/Region. */ - address_state?: string; - /** @description ZIP or postal code. */ - address_zip?: string; - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Cardholder name. */ - name?: string; - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: "company" | "individual"; + /** @description City/District/Suburb/Town/Village. */ + address_city?: string; + /** @description Billing address country, if provided when creating card. */ + address_country?: string; + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** @description State/County/Province/Region. */ + address_state?: string; + /** @description ZIP or postal code. */ + address_zip?: string; + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Cardholder name. */ name?: string; - phone?: string; + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + }; }; }; }; @@ -21756,7 +21969,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerBankAccountsId": { + DeleteCustomersCustomerBankAccountsId: { /** @description

Delete a specified source for a given customer.

*/ parameters: { path: { @@ -21765,9 +21978,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -21785,7 +22000,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerBankAccountsIdVerify": { + PostCustomersCustomerBankAccountsIdVerify: { /** @description

Verify a specified bank account for a given customer.

*/ parameters: { path: { @@ -21794,11 +22009,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: (number)[]; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: (number)[]; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -21816,7 +22033,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerCards": { + GetCustomersCustomerCards: { /** * @deprecated * @description

You can see a list of the cards belonging to a customer. @@ -21839,7 +22056,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21867,7 +22086,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerCards": { + PostCustomersCustomerCards: { /** * @description

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

* @@ -21881,48 +22100,50 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: ({ - address_city?: string; - address_country?: string; - address_line1?: string; - address_line2?: string; - address_state?: string; - address_zip?: string; - cvc?: string; - exp_month: number; - exp_year: number; + content: { + "application/x-www-form-urlencoded": { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: ({ + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { + [key: string]: string | undefined; + }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + }) | string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - name?: string; - number: string; - /** @enum {string} */ - object?: "card"; - }) | string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; }; - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string; }; }; responses: { @@ -21940,7 +22161,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerCardsId": { + GetCustomersCustomerCardsId: { /** * @deprecated * @description

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

@@ -21956,7 +22177,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -21973,7 +22196,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerCardsId": { + PostCustomersCustomerCardsId: { /** @description

Update a specified source for a given customer.

*/ parameters: { path: { @@ -21982,52 +22205,54 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: "company" | "individual"; - /** @description City/District/Suburb/Town/Village. */ - address_city?: string; - /** @description Billing address country, if provided when creating card. */ - address_country?: string; - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** @description State/County/Province/Region. */ - address_state?: string; - /** @description ZIP or postal code. */ - address_zip?: string; - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Cardholder name. */ - name?: string; - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: "company" | "individual"; + /** @description City/District/Suburb/Town/Village. */ + address_city?: string; + /** @description Billing address country, if provided when creating card. */ + address_country?: string; + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** @description State/County/Province/Region. */ + address_state?: string; + /** @description ZIP or postal code. */ + address_zip?: string; + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Cardholder name. */ name?: string; - phone?: string; + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + }; }; }; }; @@ -22046,7 +22271,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerCardsId": { + DeleteCustomersCustomerCardsId: { /** @description

Delete a specified source for a given customer.

*/ parameters: { path: { @@ -22055,9 +22280,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -22075,7 +22302,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerCashBalance": { + GetCustomersCustomerCashBalance: { /** @description

Retrieves a customer’s cash balance.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -22087,7 +22314,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22104,7 +22333,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerCashBalance": { + PostCustomersCustomerCashBalance: { /** @description

Changes the settings on a customer’s cash balance.

*/ parameters: { path: { @@ -22112,16 +22341,18 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * balance_settings_param - * @description A hash of settings for this cash balance. - */ - settings?: { - /** @enum {string} */ - reconciliation_mode?: "automatic" | "manual"; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; }; }; }; @@ -22140,7 +22371,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerCashBalanceTransactions": { + GetCustomersCustomerCashBalanceTransactions: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -22158,7 +22389,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22187,7 +22420,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerCashBalanceTransactionsTransaction": { + GetCustomersCustomerCashBalanceTransactionsTransaction: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -22200,7 +22433,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22217,7 +22452,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerDiscount": { + GetCustomersCustomerDiscount: { parameters: { /** @description Specifies which fields in the response should be expanded. */ query?: { @@ -22228,7 +22463,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22245,7 +22482,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerDiscount": { + DeleteCustomersCustomerDiscount: { /** @description

Removes the currently applied discount on a customer.

*/ parameters: { path: { @@ -22253,7 +22490,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22270,7 +22509,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerFundingInstructions": { + PostCustomersCustomerFundingInstructions: { /** * @description

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new * funding instructions will be created. If funding instructions have already been created for a given customer, the same @@ -22282,29 +22521,31 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** - * bank_transfer_params - * @description Additional parameters for `bank_transfer` funding types - */ - bank_transfer: { - /** eu_bank_account_params */ - eu_bank_transfer?: { - country: string; + content: { + "application/x-www-form-urlencoded": { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; }; - requested_address_types?: ("iban" | "sort_code" | "spei" | "zengin")[]; - /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: "bank_transfer"; }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description The `funding_type` to get the instructions for. - * @enum {string} - */ - funding_type: "bank_transfer"; }; }; responses: { @@ -22322,7 +22563,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerPaymentMethods": { + GetCustomersCustomerPaymentMethods: { /** @description

Returns a list of PaymentMethods for a given Customer

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -22342,7 +22583,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22370,7 +22613,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerPaymentMethodsPaymentMethod": { + GetCustomersCustomerPaymentMethodsPaymentMethod: { /** @description

Retrieves a PaymentMethod object for a given Customer.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -22383,7 +22626,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22400,7 +22645,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerSources": { + GetCustomersCustomerSources: { /** @description

List sources for a specified customer.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -22420,7 +22665,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22449,7 +22696,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerSources": { + PostCustomersCustomerSources: { /** * @description

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

* @@ -22463,48 +22710,50 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: ({ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }) | string; - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: ({ - address_city?: string; - address_country?: string; - address_line1?: string; - address_line2?: string; - address_state?: string; - address_zip?: string; - cvc?: string; - exp_month: number; - exp_year: number; + content: { + "application/x-www-form-urlencoded": { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: ({ + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + }) | string; + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: ({ + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { + [key: string]: string | undefined; + }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + }) | string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - name?: string; - number: string; - /** @enum {string} */ - object?: "card"; - }) | string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; }; - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string; }; }; responses: { @@ -22522,7 +22771,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerSourcesId": { + GetCustomersCustomerSourcesId: { /** @description

Retrieve a specified source for a given customer.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -22535,7 +22784,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22552,7 +22803,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerSourcesId": { + PostCustomersCustomerSourcesId: { /** @description

Update a specified source for a given customer.

*/ parameters: { path: { @@ -22561,52 +22812,54 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: "company" | "individual"; - /** @description City/District/Suburb/Town/Village. */ - address_city?: string; - /** @description Billing address country, if provided when creating card. */ - address_country?: string; - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** @description State/County/Province/Region. */ - address_state?: string; - /** @description ZIP or postal code. */ - address_zip?: string; - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Cardholder name. */ - name?: string; - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: "company" | "individual"; + /** @description City/District/Suburb/Town/Village. */ + address_city?: string; + /** @description Billing address country, if provided when creating card. */ + address_country?: string; + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** @description State/County/Province/Region. */ + address_state?: string; + /** @description ZIP or postal code. */ + address_zip?: string; + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Cardholder name. */ name?: string; - phone?: string; + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + }; }; }; }; @@ -22625,7 +22878,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerSourcesId": { + DeleteCustomersCustomerSourcesId: { /** @description

Delete a specified source for a given customer.

*/ parameters: { path: { @@ -22634,9 +22887,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -22654,7 +22909,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerSourcesIdVerify": { + PostCustomersCustomerSourcesIdVerify: { /** @description

Verify a specified bank account for a given customer.

*/ parameters: { path: { @@ -22663,11 +22918,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: (number)[]; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: (number)[]; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -22685,7 +22942,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerSubscriptions": { + GetCustomersCustomerSubscriptions: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -22703,7 +22960,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22732,7 +22991,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerSubscriptions": { + PostCustomersCustomerSubscriptions: { /** @description

Creates a new subscription on an existing customer.

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

Retrieves the subscription with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -22971,7 +23232,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -22988,7 +23251,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerSubscriptionsSubscriptionExposedId": { + PostCustomersCustomerSubscriptionsSubscriptionExposedId: { /** @description

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

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

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

* @@ -23226,13 +23491,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean; - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean; + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean; + }; }; }; responses: { @@ -23250,7 +23517,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount": { + GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { parameters: { /** @description Specifies which fields in the response should be expanded. */ query?: { @@ -23262,7 +23529,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23279,7 +23548,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount": { + DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { /** @description

Removes the currently applied discount on a customer.

*/ parameters: { path: { @@ -23288,7 +23557,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23305,7 +23576,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerTaxIds": { + GetCustomersCustomerTaxIds: { /** @description

Returns a list of tax IDs for a customer.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -23323,7 +23594,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23352,7 +23625,7 @@ export interface operations { }; }; }; - "PostCustomersCustomerTaxIds": { + PostCustomersCustomerTaxIds: { /** @description

Creates a new TaxID object for a customer.

*/ parameters: { path: { @@ -23360,16 +23633,18 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` - * @enum {string} - */ - type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; - /** @description Value of the tax ID. */ - value: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @enum {string} + */ + type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; + /** @description Value of the tax ID. */ + value: string; + }; }; }; responses: { @@ -23387,7 +23662,7 @@ export interface operations { }; }; }; - "GetCustomersCustomerTaxIdsId": { + GetCustomersCustomerTaxIdsId: { /** @description

Retrieves the TaxID object with the given identifier.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -23400,7 +23675,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23417,7 +23694,7 @@ export interface operations { }; }; }; - "DeleteCustomersCustomerTaxIdsId": { + DeleteCustomersCustomerTaxIdsId: { /** @description

Deletes an existing TaxID object.

*/ parameters: { path: { @@ -23426,7 +23703,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23443,7 +23722,7 @@ export interface operations { }; }; }; - "GetDisputes": { + GetDisputes: { /** @description

Returns a list of your disputes.

*/ parameters?: { /** @description Only return disputes associated to the charge specified by this charge ID. */ @@ -23468,7 +23747,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23496,7 +23777,7 @@ export interface operations { }; }; }; - "GetDisputesDispute": { + GetDisputesDispute: { /** @description

Retrieves the dispute with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -23508,7 +23789,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23525,7 +23808,7 @@ export interface operations { }; }; }; - "PostDisputesDispute": { + PostDisputesDispute: { /** * @description

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

* @@ -23537,48 +23820,50 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string; - billing_address?: string; - cancellation_policy?: string; - cancellation_policy_disclosure?: string; - cancellation_rebuttal?: string; - customer_communication?: string; - customer_email_address?: string; - customer_name?: string; - customer_purchase_ip?: string; - customer_signature?: string; - duplicate_charge_documentation?: string; - duplicate_charge_explanation?: string; - duplicate_charge_id?: string; - product_description?: string; - receipt?: string; - refund_policy?: string; - refund_policy_disclosure?: string; - refund_refusal_explanation?: string; - service_date?: string; - service_documentation?: string; - shipping_address?: string; - shipping_carrier?: string; - shipping_date?: string; - shipping_documentation?: string; - shipping_tracking_number?: string; - uncategorized_file?: string; - uncategorized_text?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string; + billing_address?: string; + cancellation_policy?: string; + cancellation_policy_disclosure?: string; + cancellation_rebuttal?: string; + customer_communication?: string; + customer_email_address?: string; + customer_name?: string; + customer_purchase_ip?: string; + customer_signature?: string; + duplicate_charge_documentation?: string; + duplicate_charge_explanation?: string; + duplicate_charge_id?: string; + product_description?: string; + receipt?: string; + refund_policy?: string; + refund_policy_disclosure?: string; + refund_refusal_explanation?: string; + service_date?: string; + service_documentation?: string; + shipping_address?: string; + shipping_carrier?: string; + shipping_date?: string; + shipping_documentation?: string; + shipping_tracking_number?: string; + uncategorized_file?: string; + uncategorized_text?: string; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean; }; }; responses: { @@ -23596,7 +23881,7 @@ export interface operations { }; }; }; - "PostDisputesDisputeClose": { + PostDisputesDisputeClose: { /** * @description

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

* @@ -23608,9 +23893,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -23628,16 +23915,18 @@ export interface operations { }; }; }; - "PostEphemeralKeys": { + PostEphemeralKeys: { /** @description

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

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ - issuing_card?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ + customer?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ + issuing_card?: string; + }; }; }; responses: { @@ -23655,7 +23944,7 @@ export interface operations { }; }; }; - "DeleteEphemeralKeysKey": { + DeleteEphemeralKeysKey: { /** @description

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

*/ parameters: { path: { @@ -23663,9 +23952,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -23683,7 +23974,7 @@ export interface operations { }; }; }; - "GetEvents": { + GetEvents: { /** @description

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

*/ parameters?: { /** @description Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ @@ -23710,7 +24001,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23738,7 +24031,7 @@ export interface operations { }; }; }; - "GetEventsId": { + GetEventsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -23750,7 +24043,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23767,7 +24062,7 @@ export interface operations { }; }; }; - "GetExchangeRates": { + GetExchangeRates: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -23782,7 +24077,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23810,7 +24107,7 @@ export interface operations { }; }; }; - "GetExchangeRatesRateId": { + GetExchangeRatesRateId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -23822,7 +24119,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23839,7 +24138,7 @@ export interface operations { }; }; }; - "GetFileLinks": { + GetFileLinks: { /** @description

Returns a list of file links.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -23864,7 +24163,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23893,23 +24194,25 @@ export interface operations { }; }; }; - "PostFileLinks": { + PostFileLinks: { /** @description

Creates a new file link object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description A future timestamp after which the link will no longer be usable. - */ - expires_at?: number; - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ - file: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description A future timestamp after which the link will no longer be usable. + */ + expires_at?: number; + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ + file: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -23927,7 +24230,7 @@ export interface operations { }; }; }; - "GetFileLinksLink": { + GetFileLinksLink: { /** @description

Retrieves the file link with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -23939,7 +24242,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -23956,7 +24261,7 @@ export interface operations { }; }; }; - "PostFileLinksLink": { + PostFileLinksLink: { /** @description

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

*/ parameters: { path: { @@ -23964,15 +24269,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: "now" | number | ""; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ + expires_at?: "now" | number | ""; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -23990,7 +24297,7 @@ export interface operations { }; }; }; - "GetFiles": { + GetFiles: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -24013,7 +24320,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24041,35 +24350,37 @@ export interface operations { }; }; }; - "PostFiles": { + PostFiles: { /** * @description

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

* *

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

*/ requestBody: { - "multipart/form-data": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ - file: string; - /** - * file_link_creation_params - * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. - */ - file_link_data?: { - create: boolean; - /** Format: unix-time */ - expires_at?: number; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "multipart/form-data": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ + file: string; + /** + * file_link_creation_params + * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + */ + file_link_data?: { + create: boolean; + /** Format: unix-time */ + expires_at?: number; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; + /** + * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + * @enum {string} + */ + purpose: "account_requirement" | "additional_verification" | "business_icon" | "business_logo" | "customer_signature" | "dispute_evidence" | "identity_document" | "pci_document" | "tax_document_user_upload" | "terminal_reader_splashscreen"; }; - /** - * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. - * @enum {string} - */ - purpose: "account_requirement" | "additional_verification" | "business_icon" | "business_logo" | "customer_signature" | "dispute_evidence" | "identity_document" | "pci_document" | "tax_document_user_upload" | "terminal_reader_splashscreen"; }; }; responses: { @@ -24087,7 +24398,7 @@ export interface operations { }; }; }; - "GetFilesFile": { + GetFilesFile: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -24099,7 +24410,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24116,7 +24429,7 @@ export interface operations { }; }; }; - "GetFinancialConnectionsAccounts": { + GetFinancialConnectionsAccounts: { /** @description

Returns a list of Financial Connections Account objects.

*/ parameters?: { /** @description If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ @@ -24138,7 +24451,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24167,7 +24482,7 @@ export interface operations { }; }; }; - "GetFinancialConnectionsAccountsAccount": { + GetFinancialConnectionsAccountsAccount: { /** @description

Retrieves the details of an Financial Connections Account.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -24179,7 +24494,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24196,7 +24513,7 @@ export interface operations { }; }; }; - "PostFinancialConnectionsAccountsAccountDisconnect": { + PostFinancialConnectionsAccountsAccountDisconnect: { /** @description

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

*/ parameters: { path: { @@ -24204,9 +24521,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -24224,7 +24543,7 @@ export interface operations { }; }; }; - "GetFinancialConnectionsAccountsAccountOwners": { + GetFinancialConnectionsAccountsAccountOwners: { /** @description

Lists all owners for a given Account

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -24244,7 +24563,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24273,7 +24594,7 @@ export interface operations { }; }; }; - "PostFinancialConnectionsAccountsAccountRefresh": { + PostFinancialConnectionsAccountsAccountRefresh: { /** @description

Refreshes the data associated with a Financial Connections Account.

*/ parameters: { path: { @@ -24281,11 +24602,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The list of account features that you would like to refresh. */ - features: ("balance" | "ownership")[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The list of account features that you would like to refresh. */ + features: ("balance" | "ownership")[]; + }; }; }; responses: { @@ -24303,37 +24626,39 @@ export interface operations { }; }; }; - "PostFinancialConnectionsSessions": { + PostFinancialConnectionsSessions: { /** @description

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

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

Retrieves the details of a Financial Connections Session

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -24363,7 +24688,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24380,7 +24707,7 @@ export interface operations { }; }; }; - "GetIdentityVerificationReports": { + GetIdentityVerificationReports: { /** @description

List all verification reports.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -24405,7 +24732,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24433,7 +24762,7 @@ export interface operations { }; }; }; - "GetIdentityVerificationReportsReport": { + GetIdentityVerificationReportsReport: { /** @description

Retrieves an existing VerificationReport

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -24445,7 +24774,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24462,7 +24793,7 @@ export interface operations { }; }; }; - "GetIdentityVerificationSessions": { + GetIdentityVerificationSessions: { /** @description

Returns a list of VerificationSessions

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -24485,7 +24816,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24513,7 +24846,7 @@ export interface operations { }; }; }; - "PostIdentityVerificationSessions": { + PostIdentityVerificationSessions: { /** * @description

Creates a VerificationSession object.

* @@ -24524,32 +24857,34 @@ export interface operations { *

Related guide: Verify your users’ identity documents.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * session_options_param - * @description A set of options for the session’s verification checks. - */ - options?: { - document?: ({ - allowed_types?: ("driving_license" | "id_card" | "passport")[]; - require_id_number?: boolean; - require_live_capture?: boolean; - require_matching_selfie?: boolean; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * session_options_param + * @description A set of options for the session’s verification checks. + */ + options?: { + document?: ({ + allowed_types?: ("driving_license" | "id_card" | "passport")[]; + require_id_number?: boolean; + require_live_capture?: boolean; + require_matching_selfie?: boolean; + }) | ""; + }; + /** @description The URL that the user will be redirected to upon completing the verification flow. */ + return_url?: string; + /** + * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + * @enum {string} + */ + type: "document" | "id_number"; }; - /** @description The URL that the user will be redirected to upon completing the verification flow. */ - return_url?: string; - /** - * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - * @enum {string} - */ - type: "document" | "id_number"; }; }; responses: { @@ -24567,7 +24902,7 @@ export interface operations { }; }; }; - "GetIdentityVerificationSessionsSession": { + GetIdentityVerificationSessionsSession: { /** * @description

Retrieves the details of a VerificationSession that was previously created.

* @@ -24584,7 +24919,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24601,7 +24938,7 @@ export interface operations { }; }; }; - "PostIdentityVerificationSessionsSession": { + PostIdentityVerificationSessionsSession: { /** * @description

Updates a VerificationSession object.

* @@ -24614,30 +24951,32 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * session_options_param - * @description A set of options for the session’s verification checks. - */ - options?: { - document?: ({ - allowed_types?: ("driving_license" | "id_card" | "passport")[]; - require_id_number?: boolean; - require_live_capture?: boolean; - require_matching_selfie?: boolean; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * session_options_param + * @description A set of options for the session’s verification checks. + */ + options?: { + document?: ({ + allowed_types?: ("driving_license" | "id_card" | "passport")[]; + require_id_number?: boolean; + require_live_capture?: boolean; + require_matching_selfie?: boolean; + }) | ""; + }; + /** + * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + * @enum {string} + */ + type?: "document" | "id_number"; }; - /** - * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - * @enum {string} - */ - type?: "document" | "id_number"; }; }; responses: { @@ -24655,7 +24994,7 @@ export interface operations { }; }; }; - "PostIdentityVerificationSessionsSessionCancel": { + PostIdentityVerificationSessionsSessionCancel: { /** * @description

A VerificationSession object can be canceled when it is in requires_input status.

* @@ -24667,9 +25006,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -24687,7 +25028,7 @@ export interface operations { }; }; }; - "PostIdentityVerificationSessionsSessionRedact": { + PostIdentityVerificationSessionsSessionRedact: { /** * @description

Redact a VerificationSession to remove all collected information from Stripe. This will redact * the VerificationSession and all objects related to it, including VerificationReports, Events, @@ -24715,9 +25056,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -24735,7 +25078,7 @@ export interface operations { }; }; }; - "GetInvoiceitems": { + GetInvoiceitems: { /** @description

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

*/ parameters?: { /** @description The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ @@ -24762,7 +25105,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24790,78 +25135,80 @@ export interface operations { }; }; }; - "PostInvoiceitems": { + PostInvoiceitems: { /** @description

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ - amount?: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: string; - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string; - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ - discountable?: boolean; - /** @description The coupons to redeem into discounts for the invoice item or invoice line item. */ - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. */ - invoice?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * period - * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. - */ - period?: { - /** Format: unix-time */ - end: number; - /** Format: unix-time */ - start: number; - }; - /** @description The ID of the price object. */ - price?: string; - /** - * one_time_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string; - product: string; - /** @enum {string} */ + content: { + "application/x-www-form-urlencoded": { + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + amount?: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description The ID of the customer who will be billed when this invoice item is billed. */ + customer: string; + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ + discountable?: boolean; + /** @description The coupons to redeem into discounts for the invoice item or invoice line item. */ + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. */ + invoice?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * period + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. + */ + period?: { + /** Format: unix-time */ + end: number; + /** Format: unix-time */ + start: number; + }; + /** @description The ID of the price object. */ + price?: string; + /** + * one_time_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string; + product: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ + subscription?: string; + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | ""; + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ + tax_rates?: (string)[]; + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number; - /** Format: decimal */ + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ unit_amount_decimal?: string; }; - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number; - /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ - subscription?: string; - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ - tax_code?: string | ""; - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ - tax_rates?: (string)[]; - /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ - unit_amount?: number; - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string; }; }; responses: { @@ -24879,7 +25226,7 @@ export interface operations { }; }; }; - "GetInvoiceitemsInvoiceitem": { + GetInvoiceitemsInvoiceitem: { /** @description

Retrieves the invoice item with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -24891,7 +25238,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -24908,7 +25257,7 @@ export interface operations { }; }; }; - "PostInvoiceitemsInvoiceitem": { + PostInvoiceitemsInvoiceitem: { /** @description

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

*/ parameters: { path: { @@ -24916,67 +25265,69 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ - amount?: number; - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string; - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ - discountable?: boolean; - /** @description The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. */ - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * period - * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. - */ - period?: { - /** Format: unix-time */ - end: number; - /** Format: unix-time */ - start: number; - }; - /** @description The ID of the price object. */ - price?: string; - /** - * one_time_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string; - product: string; - /** @enum {string} */ + content: { + "application/x-www-form-urlencoded": { + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + amount?: number; + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ + discountable?: boolean; + /** @description The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. */ + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * period + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. + */ + period?: { + /** Format: unix-time */ + end: number; + /** Format: unix-time */ + start: number; + }; + /** @description The ID of the price object. */ + price?: string; + /** + * one_time_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string; + product: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | ""; + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ + tax_rates?: (string)[] | ""; + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number; - /** Format: decimal */ + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ unit_amount_decimal?: string; }; - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number; - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ - tax_code?: string | ""; - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ - tax_rates?: (string)[] | ""; - /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ - unit_amount?: number; - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string; }; }; responses: { @@ -24994,7 +25345,7 @@ export interface operations { }; }; }; - "DeleteInvoiceitemsInvoiceitem": { + DeleteInvoiceitemsInvoiceitem: { /** @description

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

*/ parameters: { path: { @@ -25002,7 +25353,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25019,7 +25372,7 @@ export interface operations { }; }; }; - "GetInvoices": { + GetInvoices: { /** @description

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

*/ parameters?: { /** @description The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ @@ -25054,7 +25407,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25082,156 +25437,158 @@ export interface operations { }; }; }; - "PostInvoices": { + PostInvoices: { /** @description

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

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

Search for invoices you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -25270,7 +25627,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25299,7 +25658,7 @@ export interface operations { }; }; }; - "GetInvoicesUpcoming": { + GetInvoicesUpcoming: { /** * @description

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

* @@ -25460,7 +25819,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25477,7 +25838,7 @@ export interface operations { }; }; }; - "GetInvoicesUpcomingLines": { + GetInvoicesUpcomingLines: { /** @description

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

*/ parameters?: { /** @description Settings for automatic tax lookup for this invoice preview. */ @@ -25638,7 +25999,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25667,7 +26030,7 @@ export interface operations { }; }; }; - "GetInvoicesInvoice": { + GetInvoicesInvoice: { /** @description

Retrieves the invoice with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -25679,7 +26042,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25696,7 +26061,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoice": { + PostInvoicesInvoice: { /** * @description

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

@@ -25711,131 +26076,133 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: (string)[] | ""; - /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ - application_fee_amount?: number; - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ - auto_advance?: boolean; - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this invoice. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - * @enum {string} - */ - collection_method?: "charge_automatically" | "send_invoice"; - /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ - custom_fields?: ({ - name: string; - value: string; - })[] | ""; - /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ - days_until_due?: number; - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string; - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string; - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: (string)[] | ""; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string; - /** @description The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. */ - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - /** - * Format: unix-time - * @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - */ - due_date?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Footer to be displayed on the invoice. */ - footer?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: string | ""; - /** - * payment_settings - * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - */ - payment_settings?: { - default_mandate?: string; - /** payment_method_options */ - payment_method_options?: { - acss_debit?: ({ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - bancontact?: ({ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }) | ""; - card?: ({ - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: { - count: number; - /** @enum {string} */ - interval: "month"; + content: { + "application/x-www-form-urlencoded": { + /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ + account_tax_ids?: (string)[] | ""; + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + application_fee_amount?: number; + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ + auto_advance?: boolean; + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this invoice. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + * @enum {string} + */ + collection_method?: "charge_automatically" | "send_invoice"; + /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ + custom_fields?: ({ + name: string; + value: string; + })[] | ""; + /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ + days_until_due?: number; + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string; + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string; + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: (string)[] | ""; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string; + /** @description The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. */ + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + /** + * Format: unix-time + * @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + */ + due_date?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Footer to be displayed on the invoice. */ + footer?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ + on_behalf_of?: string | ""; + /** + * payment_settings + * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + */ + payment_settings?: { + default_mandate?: string; + /** payment_method_options */ + payment_method_options?: { + acss_debit?: ({ + /** mandate_options_param */ + mandate_options?: { /** @enum {string} */ - type: "fixed_count"; - } | ""; - }; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }) | ""; - customer_balance?: { - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_param */ - eu_bank_transfer?: { - country: string; + transaction_type?: "business" | "personal"; }; - type?: string; - }; - funding_type?: string; - } | ""; - konbini?: Record | ""; - us_bank_account?: ({ - /** invoice_linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + bancontact?: ({ + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + }) | ""; + card?: ({ + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } | ""; + }; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + }) | ""; + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } | ""; + konbini?: Record | ""; + us_bank_account?: ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + }; + payment_method_types?: (("ach_credit_transfer" | "ach_debit" | "acss_debit" | "au_becs_debit" | "bacs_debit" | "bancontact" | "boleto" | "card" | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" | "paynow" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]) | ""; }; - payment_method_types?: (("ach_credit_transfer" | "ach_debit" | "acss_debit" | "au_becs_debit" | "bacs_debit" | "bancontact" | "boleto" | "card" | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" | "paynow" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]) | ""; + /** @description Options for invoice PDF rendering. */ + rendering_options?: ({ + /** @enum {string} */ + amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; + }) | ""; + /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ + statement_descriptor?: string; + /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ + transfer_data?: { + amount?: number; + destination: string; + } | ""; }; - /** @description Options for invoice PDF rendering. */ - rendering_options?: ({ - /** @enum {string} */ - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax"; - }) | ""; - /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ - statement_descriptor?: string; - /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ - transfer_data?: { - amount?: number; - destination: string; - } | ""; }; }; responses: { @@ -25853,7 +26220,7 @@ export interface operations { }; }; }; - "DeleteInvoicesInvoice": { + DeleteInvoicesInvoice: { /** @description

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

*/ parameters: { path: { @@ -25861,7 +26228,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25878,7 +26247,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoiceFinalize": { + PostInvoicesInvoiceFinalize: { /** @description

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

*/ parameters: { path: { @@ -25886,11 +26255,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -25908,7 +26279,7 @@ export interface operations { }; }; }; - "GetInvoicesInvoiceLines": { + GetInvoicesInvoiceLines: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -25926,7 +26297,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -25955,7 +26328,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoiceMarkUncollectible": { + PostInvoicesInvoiceMarkUncollectible: { /** @description

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

*/ parameters: { path: { @@ -25963,9 +26336,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -25983,7 +26358,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoicePay": { + PostInvoicesInvoicePay: { /** @description

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

*/ parameters: { path: { @@ -25991,25 +26366,27 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - * - * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. - */ - forgive?: boolean; - /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ - mandate?: string; - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ - off_session?: boolean; - /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ - paid_out_of_band?: boolean; - /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ - payment_method?: string; - /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ - source?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + * + * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + */ + forgive?: boolean; + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string; + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ + off_session?: boolean; + /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ + paid_out_of_band?: boolean; + /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ + payment_method?: string; + /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ + source?: string; + }; }; }; responses: { @@ -26027,7 +26404,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoiceSend": { + PostInvoicesInvoiceSend: { /** * @description

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

* @@ -26039,9 +26416,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -26059,7 +26438,7 @@ export interface operations { }; }; }; - "PostInvoicesInvoiceVoid": { + PostInvoicesInvoiceVoid: { /** @description

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

*/ parameters: { path: { @@ -26067,9 +26446,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -26087,7 +26468,7 @@ export interface operations { }; }; }; - "GetIssuingAuthorizations": { + GetIssuingAuthorizations: { /** @description

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

*/ parameters?: { /** @description Only return authorizations that belong to the given card. */ @@ -26115,7 +26496,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26143,7 +26526,7 @@ export interface operations { }; }; }; - "GetIssuingAuthorizationsAuthorization": { + GetIssuingAuthorizationsAuthorization: { /** @description

Retrieves an Issuing Authorization object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -26155,7 +26538,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26172,7 +26557,7 @@ export interface operations { }; }; }; - "PostIssuingAuthorizationsAuthorization": { + PostIssuingAuthorizationsAuthorization: { /** @description

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

*/ parameters: { path: { @@ -26180,13 +26565,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -26204,7 +26591,7 @@ export interface operations { }; }; }; - "PostIssuingAuthorizationsAuthorizationApprove": { + PostIssuingAuthorizationsAuthorizationApprove: { /** * @description

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. * You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.

@@ -26215,15 +26602,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ - amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ + amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -26241,7 +26630,7 @@ export interface operations { }; }; }; - "PostIssuingAuthorizationsAuthorizationDecline": { + PostIssuingAuthorizationsAuthorizationDecline: { /** * @description

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow. * You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.

@@ -26252,13 +26641,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -26276,7 +26667,7 @@ export interface operations { }; }; }; - "GetIssuingCardholders": { + GetIssuingCardholders: { /** @description

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

*/ parameters?: { /** @description Only return cardholders that were created during the given date interval. */ @@ -26306,7 +26697,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26334,91 +26727,93 @@ export interface operations { }; }; }; - "PostIssuingCardholders": { + PostIssuingCardholders: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing: { - /** required_address */ - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing: { + /** required_address */ + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; }; - }; - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string; - }; - /** @description The cardholder's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number; - month: number; - year: number; + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string; }; - first_name: string; - last_name: string; - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string; - front?: string; + /** @description The cardholder's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number; + month: number; + year: number; + }; + first_name: string; + last_name: string; + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string; + front?: string; + }; }; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ + name: string; + /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ + phone_number?: string; + /** + * authorization_controls_param_v2 + * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + spending_limits?: ({ + amount: number; + categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + /** @enum {string} */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + })[]; + spending_limits_currency?: string; + }; + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + * @enum {string} + */ + status?: "active" | "inactive"; + /** + * @description One of `individual` or `company`. + * @enum {string} + */ + type: "company" | "individual"; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ - name: string; - /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ - phone_number?: string; - /** - * authorization_controls_param_v2 - * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - spending_limits?: ({ - amount: number; - categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - /** @enum {string} */ - interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - })[]; - spending_limits_currency?: string; - }; - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - * @enum {string} - */ - status?: "active" | "inactive"; - /** - * @description One of `individual` or `company`. - * @enum {string} - */ - type: "company" | "individual"; }; }; responses: { @@ -26436,7 +26831,7 @@ export interface operations { }; }; }; - "GetIssuingCardholdersCardholder": { + GetIssuingCardholdersCardholder: { /** @description

Retrieves an Issuing Cardholder object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -26448,7 +26843,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26465,7 +26862,7 @@ export interface operations { }; }; }; - "PostIssuingCardholdersCardholder": { + PostIssuingCardholdersCardholder: { /** @description

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

*/ parameters: { path: { @@ -26473,81 +26870,83 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing?: { - /** required_address */ - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing?: { + /** required_address */ + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; }; - }; - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string; - }; - /** @description The cardholder's email address. */ - email?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number; - month: number; - year: number; + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string; }; - first_name: string; - last_name: string; - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string; - front?: string; + /** @description The cardholder's email address. */ + email?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number; + month: number; + year: number; + }; + first_name: string; + last_name: string; + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string; + front?: string; + }; }; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. */ + phone_number?: string; + /** + * authorization_controls_param_v2 + * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + spending_limits?: ({ + amount: number; + categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + /** @enum {string} */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + })[]; + spending_limits_currency?: string; + }; + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. + * @enum {string} + */ + status?: "active" | "inactive"; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. */ - phone_number?: string; - /** - * authorization_controls_param_v2 - * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - spending_limits?: ({ - amount: number; - categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - /** @enum {string} */ - interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - })[]; - spending_limits_currency?: string; - }; - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. - * @enum {string} - */ - status?: "active" | "inactive"; }; }; responses: { @@ -26565,7 +26964,7 @@ export interface operations { }; }; }; - "GetIssuingCards": { + GetIssuingCards: { /** @description

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

*/ parameters?: { /** @description Only return cards belonging to the Cardholder with the provided ID. */ @@ -26599,7 +26998,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26627,78 +27028,80 @@ export interface operations { }; }; }; - "PostIssuingCards": { + PostIssuingCards: { /** @description

Creates an Issuing Card object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ - cardholder?: string; - /** @description The currency for the card. */ - currency: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - financial_account?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The card this is meant to be a replacement for (if any). */ - replacement_for?: string; - /** - * @description If `replacement_for` is specified, this should indicate why that card is being replaced. - * @enum {string} - */ - replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; - /** - * shipping_specs - * @description The address where the card will be shipped. - */ - shipping?: { - /** required_address */ - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ + cardholder?: string; + /** @description The currency for the card. */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + financial_account?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The card this is meant to be a replacement for (if any). */ + replacement_for?: string; + /** + * @description If `replacement_for` is specified, this should indicate why that card is being replaced. + * @enum {string} + */ + replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; + /** + * shipping_specs + * @description The address where the card will be shipped. + */ + shipping?: { + /** required_address */ + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; + /** customs_param */ + customs?: { + eori_number?: string; + }; + name: string; + phone_number?: string; + require_signature?: boolean; + /** @enum {string} */ + service?: "express" | "priority" | "standard"; + /** @enum {string} */ + type?: "bulk" | "individual"; }; - /** customs_param */ - customs?: { - eori_number?: string; + /** + * authorization_controls_param + * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + spending_limits?: ({ + amount: number; + categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + /** @enum {string} */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + })[]; }; - name: string; - phone_number?: string; - require_signature?: boolean; - /** @enum {string} */ - service?: "express" | "priority" | "standard"; - /** @enum {string} */ - type?: "bulk" | "individual"; + /** + * @description Whether authorizations can be approved on this card. Defaults to `inactive`. + * @enum {string} + */ + status?: "active" | "inactive"; + /** + * @description The type of card to issue. Possible values are `physical` or `virtual`. + * @enum {string} + */ + type: "physical" | "virtual"; }; - /** - * authorization_controls_param - * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - spending_limits?: ({ - amount: number; - categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - /** @enum {string} */ - interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - })[]; - }; - /** - * @description Whether authorizations can be approved on this card. Defaults to `inactive`. - * @enum {string} - */ - status?: "active" | "inactive"; - /** - * @description The type of card to issue. Possible values are `physical` or `virtual`. - * @enum {string} - */ - type: "physical" | "virtual"; }; }; responses: { @@ -26716,7 +27119,7 @@ export interface operations { }; }; }; - "GetIssuingCardsCard": { + GetIssuingCardsCard: { /** @description

Retrieves an Issuing Card object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -26728,7 +27131,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26745,7 +27150,7 @@ export interface operations { }; }; }; - "PostIssuingCardsCard": { + PostIssuingCardsCard: { /** @description

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

*/ parameters: { path: { @@ -26753,44 +27158,46 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description Reason why the `status` of this card is `canceled`. - * @enum {string} - */ - cancellation_reason?: "lost" | "stolen"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * encrypted_pin_param - * @description The desired new PIN for this card. - */ - pin?: { - encrypted_number?: string; - }; - /** - * authorization_controls_param - * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - spending_limits?: ({ - amount: number; - categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; - /** @enum {string} */ - interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - })[]; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Reason why the `status` of this card is `canceled`. + * @enum {string} + */ + cancellation_reason?: "lost" | "stolen"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * encrypted_pin_param + * @description The desired new PIN for this card. + */ + pin?: { + encrypted_number?: string; + }; + /** + * authorization_controls_param + * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + blocked_categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + spending_limits?: ({ + amount: number; + categories?: ("ac_refrigeration_repair" | "accounting_bookkeeping_services" | "advertising_services" | "agricultural_cooperative" | "airlines_air_carriers" | "airports_flying_fields" | "ambulance_services" | "amusement_parks_carnivals" | "antique_reproductions" | "antique_shops" | "aquariums" | "architectural_surveying_services" | "art_dealers_and_galleries" | "artists_supply_and_craft_shops" | "auto_and_home_supply_stores" | "auto_body_repair_shops" | "auto_paint_shops" | "auto_service_shops" | "automated_cash_disburse" | "automated_fuel_dispensers" | "automobile_associations" | "automotive_parts_and_accessories_stores" | "automotive_tire_stores" | "bail_and_bond_payments" | "bakeries" | "bands_orchestras" | "barber_and_beauty_shops" | "betting_casino_gambling" | "bicycle_shops" | "billiard_pool_establishments" | "boat_dealers" | "boat_rentals_and_leases" | "book_stores" | "books_periodicals_and_newspapers" | "bowling_alleys" | "bus_lines" | "business_secretarial_schools" | "buying_shopping_services" | "cable_satellite_and_other_pay_television_and_radio" | "camera_and_photographic_supply_stores" | "candy_nut_and_confectionery_stores" | "car_and_truck_dealers_new_used" | "car_and_truck_dealers_used_only" | "car_rental_agencies" | "car_washes" | "carpentry_services" | "carpet_upholstery_cleaning" | "caterers" | "charitable_and_social_service_organizations_fundraising" | "chemicals_and_allied_products" | "child_care_services" | "childrens_and_infants_wear_stores" | "chiropodists_podiatrists" | "chiropractors" | "cigar_stores_and_stands" | "civic_social_fraternal_associations" | "cleaning_and_maintenance" | "clothing_rental" | "colleges_universities" | "commercial_equipment" | "commercial_footwear" | "commercial_photography_art_and_graphics" | "commuter_transport_and_ferries" | "computer_network_services" | "computer_programming" | "computer_repair" | "computer_software_stores" | "computers_peripherals_and_software" | "concrete_work_services" | "construction_materials" | "consulting_public_relations" | "correspondence_schools" | "cosmetic_stores" | "counseling_services" | "country_clubs" | "courier_services" | "court_costs" | "credit_reporting_agencies" | "cruise_lines" | "dairy_products_stores" | "dance_hall_studios_schools" | "dating_escort_services" | "dentists_orthodontists" | "department_stores" | "detective_agencies" | "digital_goods_applications" | "digital_goods_games" | "digital_goods_large_volume" | "digital_goods_media" | "direct_marketing_catalog_merchant" | "direct_marketing_combination_catalog_and_retail_merchant" | "direct_marketing_inbound_telemarketing" | "direct_marketing_insurance_services" | "direct_marketing_other" | "direct_marketing_outbound_telemarketing" | "direct_marketing_subscription" | "direct_marketing_travel" | "discount_stores" | "doctors" | "door_to_door_sales" | "drapery_window_covering_and_upholstery_stores" | "drinking_places" | "drug_stores_and_pharmacies" | "drugs_drug_proprietaries_and_druggist_sundries" | "dry_cleaners" | "durable_goods" | "duty_free_stores" | "eating_places_restaurants" | "educational_services" | "electric_razor_stores" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "employment_temp_agencies" | "equipment_rental" | "exterminating_services" | "family_clothing_stores" | "fast_food_restaurants" | "financial_institutions" | "fines_government_administrative_entities" | "fireplace_fireplace_screens_and_accessories_stores" | "floor_covering_stores" | "florists" | "florists_supplies_nursery_stock_and_flowers" | "freezer_and_locker_meat_provisioners" | "fuel_dealers_non_automotive" | "funeral_services_crematories" | "furniture_home_furnishings_and_equipment_stores_except_appliances" | "furniture_repair_refinishing" | "furriers_and_fur_shops" | "general_services" | "gift_card_novelty_and_souvenir_shops" | "glass_paint_and_wallpaper_stores" | "glassware_crystal_stores" | "golf_courses_public" | "government_services" | "grocery_stores_supermarkets" | "hardware_equipment_and_supplies" | "hardware_stores" | "health_and_beauty_spas" | "hearing_aids_sales_and_supplies" | "heating_plumbing_a_c" | "hobby_toy_and_game_shops" | "home_supply_warehouse_stores" | "hospitals" | "hotels_motels_and_resorts" | "household_appliance_stores" | "industrial_supplies" | "information_retrieval_services" | "insurance_default" | "insurance_underwriting_premiums" | "intra_company_purchases" | "jewelry_stores_watches_clocks_and_silverware_stores" | "landscaping_services" | "laundries" | "laundry_cleaning_services" | "legal_services_attorneys" | "luggage_and_leather_goods_stores" | "lumber_building_materials_stores" | "manual_cash_disburse" | "marinas_service_and_supplies" | "masonry_stonework_and_plaster" | "massage_parlors" | "medical_and_dental_labs" | "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" | "medical_services" | "membership_organizations" | "mens_and_boys_clothing_and_accessories_stores" | "mens_womens_clothing_stores" | "metal_service_centers" | "miscellaneous" | "miscellaneous_apparel_and_accessory_shops" | "miscellaneous_auto_dealers" | "miscellaneous_business_services" | "miscellaneous_food_stores" | "miscellaneous_general_merchandise" | "miscellaneous_general_services" | "miscellaneous_home_furnishing_specialty_stores" | "miscellaneous_publishing_and_printing" | "miscellaneous_recreation_services" | "miscellaneous_repair_shops" | "miscellaneous_specialty_retail" | "mobile_home_dealers" | "motion_picture_theaters" | "motor_freight_carriers_and_trucking" | "motor_homes_dealers" | "motor_vehicle_supplies_and_new_parts" | "motorcycle_shops_and_dealers" | "motorcycle_shops_dealers" | "music_stores_musical_instruments_pianos_and_sheet_music" | "news_dealers_and_newsstands" | "non_fi_money_orders" | "non_fi_stored_value_card_purchase_load" | "nondurable_goods" | "nurseries_lawn_and_garden_supply_stores" | "nursing_personal_care" | "office_and_commercial_furniture" | "opticians_eyeglasses" | "optometrists_ophthalmologist" | "orthopedic_goods_prosthetic_devices" | "osteopaths" | "package_stores_beer_wine_and_liquor" | "paints_varnishes_and_supplies" | "parking_lots_garages" | "passenger_railways" | "pawn_shops" | "pet_shops_pet_food_and_supplies" | "petroleum_and_petroleum_products" | "photo_developing" | "photographic_photocopy_microfilm_equipment_and_supplies" | "photographic_studios" | "picture_video_production" | "piece_goods_notions_and_other_dry_goods" | "plumbing_heating_equipment_and_supplies" | "political_organizations" | "postal_services_government_only" | "precious_stones_and_metals_watches_and_jewelry" | "professional_services" | "public_warehousing_and_storage" | "quick_copy_repro_and_blueprint" | "railroads" | "real_estate_agents_and_managers_rentals" | "record_stores" | "recreational_vehicle_rentals" | "religious_goods_stores" | "religious_organizations" | "roofing_siding_sheet_metal" | "secretarial_support_services" | "security_brokers_dealers" | "service_stations" | "sewing_needlework_fabric_and_piece_goods_stores" | "shoe_repair_hat_cleaning" | "shoe_stores" | "small_appliance_repair" | "snowmobile_dealers" | "special_trade_services" | "specialty_cleaning" | "sporting_goods_stores" | "sporting_recreation_camps" | "sports_and_riding_apparel_stores" | "sports_clubs_fields" | "stamp_and_coin_stores" | "stationary_office_supplies_printing_and_writing_paper" | "stationery_stores_office_and_school_supply_stores" | "swimming_pools_sales" | "t_ui_travel_germany" | "tailors_alterations" | "tax_payments_government_agencies" | "tax_preparation_services" | "taxicabs_limousines" | "telecommunication_equipment_and_telephone_sales" | "telecommunication_services" | "telegraph_services" | "tent_and_awning_shops" | "testing_laboratories" | "theatrical_ticket_agencies" | "timeshares" | "tire_retreading_and_repair" | "tolls_bridge_fees" | "tourist_attractions_and_exhibits" | "towing_services" | "trailer_parks_campgrounds" | "transportation_services" | "travel_agencies_tour_operators" | "truck_stop_iteration" | "truck_utility_trailer_rentals" | "typesetting_plate_making_and_related_services" | "typewriter_stores" | "u_s_federal_government_agencies_or_departments" | "uniforms_commercial_clothing" | "used_merchandise_and_secondhand_stores" | "utilities" | "variety_stores" | "veterinary_services" | "video_amusement_game_supplies" | "video_game_arcades" | "video_tape_rental_stores" | "vocational_trade_schools" | "watch_jewelry_repair" | "welding_repair" | "wholesale_clubs" | "wig_and_toupee_stores" | "wires_money_orders" | "womens_accessory_and_specialty_shops" | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards")[]; + /** @enum {string} */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + })[]; + }; + /** + * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + * @enum {string} + */ + status?: "active" | "canceled" | "inactive"; }; - /** - * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - * @enum {string} - */ - status?: "active" | "canceled" | "inactive"; }; }; responses: { @@ -26808,7 +27215,7 @@ export interface operations { }; }; }; - "GetIssuingDisputes": { + GetIssuingDisputes: { /** @description

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

*/ parameters?: { /** @description Select Issuing disputes that were created during the given date interval. */ @@ -26834,7 +27241,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26862,91 +27271,93 @@ export interface operations { }; }; }; - "PostIssuingDisputes": { + PostIssuingDisputes: { /** @description

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ - amount?: number; - /** - * evidence_param - * @description Evidence provided for the dispute. - */ - evidence?: { - canceled?: ({ - additional_documentation?: string | ""; - canceled_at?: number | ""; - cancellation_policy_provided?: boolean | ""; - cancellation_reason?: string; - expected_at?: number | ""; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: number | ""; - }) | ""; - duplicate?: ({ - additional_documentation?: string | ""; - card_statement?: string | ""; - cash_receipt?: string | ""; - check_image?: string | ""; - explanation?: string; - original_transaction?: string; - }) | ""; - fraudulent?: ({ - additional_documentation?: string | ""; - explanation?: string; - }) | ""; - merchandise_not_as_described?: ({ - additional_documentation?: string | ""; - explanation?: string; - received_at?: number | ""; - return_description?: string; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: number | ""; - }) | ""; - not_received?: ({ - additional_documentation?: string | ""; - expected_at?: number | ""; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }) | ""; - other?: ({ - additional_documentation?: string | ""; - explanation?: string; - product_description?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number; + /** + * evidence_param + * @description Evidence provided for the dispute. + */ + evidence?: { + canceled?: ({ + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_policy_provided?: boolean | ""; + cancellation_reason?: string; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + }) | ""; + duplicate?: ({ + additional_documentation?: string | ""; + card_statement?: string | ""; + cash_receipt?: string | ""; + check_image?: string | ""; + explanation?: string; + original_transaction?: string; + }) | ""; + fraudulent?: ({ + additional_documentation?: string | ""; + explanation?: string; + }) | ""; + merchandise_not_as_described?: ({ + additional_documentation?: string | ""; + explanation?: string; + received_at?: number | ""; + return_description?: string; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + }) | ""; + not_received?: ({ + additional_documentation?: string | ""; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + }) | ""; + other?: ({ + additional_documentation?: string | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + }) | ""; /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }) | ""; - /** @enum {string} */ - reason?: "canceled" | "duplicate" | "fraudulent" | "merchandise_not_as_described" | "not_received" | "other" | "service_not_as_described"; - service_not_as_described?: ({ - additional_documentation?: string | ""; - canceled_at?: number | ""; - cancellation_reason?: string; - explanation?: string; - received_at?: number | ""; - }) | ""; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ - transaction?: string; - /** - * treasury_param - * @description Params for disputes related to Treasury FinancialAccounts - */ - treasury?: { - received_debit: string; + reason?: "canceled" | "duplicate" | "fraudulent" | "merchandise_not_as_described" | "not_received" | "other" | "service_not_as_described"; + service_not_as_described?: ({ + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_reason?: string; + explanation?: string; + received_at?: number | ""; + }) | ""; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string; + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string; + }; }; }; }; @@ -26965,7 +27376,7 @@ export interface operations { }; }; }; - "GetIssuingDisputesDispute": { + GetIssuingDisputesDispute: { /** @description

Retrieves an Issuing Dispute object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -26977,7 +27388,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -26994,7 +27407,7 @@ export interface operations { }; }; }; - "PostIssuingDisputesDispute": { + PostIssuingDisputesDispute: { /** @description

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

*/ parameters: { path: { @@ -27002,80 +27415,82 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount?: number; - /** - * evidence_param - * @description Evidence provided for the dispute. - */ - evidence?: { - canceled?: ({ - additional_documentation?: string | ""; - canceled_at?: number | ""; - cancellation_policy_provided?: boolean | ""; - cancellation_reason?: string; - expected_at?: number | ""; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: number | ""; - }) | ""; - duplicate?: ({ - additional_documentation?: string | ""; - card_statement?: string | ""; - cash_receipt?: string | ""; - check_image?: string | ""; - explanation?: string; - original_transaction?: string; - }) | ""; - fraudulent?: ({ - additional_documentation?: string | ""; - explanation?: string; - }) | ""; - merchandise_not_as_described?: ({ - additional_documentation?: string | ""; - explanation?: string; - received_at?: number | ""; - return_description?: string; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: number | ""; - }) | ""; - not_received?: ({ - additional_documentation?: string | ""; - expected_at?: number | ""; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }) | ""; - other?: ({ - additional_documentation?: string | ""; - explanation?: string; - product_description?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number; + /** + * evidence_param + * @description Evidence provided for the dispute. + */ + evidence?: { + canceled?: ({ + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_policy_provided?: boolean | ""; + cancellation_reason?: string; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + }) | ""; + duplicate?: ({ + additional_documentation?: string | ""; + card_statement?: string | ""; + cash_receipt?: string | ""; + check_image?: string | ""; + explanation?: string; + original_transaction?: string; + }) | ""; + fraudulent?: ({ + additional_documentation?: string | ""; + explanation?: string; + }) | ""; + merchandise_not_as_described?: ({ + additional_documentation?: string | ""; + explanation?: string; + received_at?: number | ""; + return_description?: string; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + }) | ""; + not_received?: ({ + additional_documentation?: string | ""; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + }) | ""; + other?: ({ + additional_documentation?: string | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + }) | ""; /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }) | ""; - /** @enum {string} */ - reason?: "canceled" | "duplicate" | "fraudulent" | "merchandise_not_as_described" | "not_received" | "other" | "service_not_as_described"; - service_not_as_described?: ({ - additional_documentation?: string | ""; - canceled_at?: number | ""; - cancellation_reason?: string; - explanation?: string; - received_at?: number | ""; + reason?: "canceled" | "duplicate" | "fraudulent" | "merchandise_not_as_described" | "not_received" | "other" | "service_not_as_described"; + service_not_as_described?: ({ + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_reason?: string; + explanation?: string; + received_at?: number | ""; + }) | ""; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; }) | ""; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; }; }; responses: { @@ -27093,7 +27508,7 @@ export interface operations { }; }; }; - "PostIssuingDisputesDisputeSubmit": { + PostIssuingDisputesDisputeSubmit: { /** @description

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

*/ parameters: { path: { @@ -27101,13 +27516,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -27125,7 +27542,7 @@ export interface operations { }; }; }; - "GetIssuingSettlements": { + GetIssuingSettlements: { /** @description

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

*/ parameters?: { /** @description Only return issuing settlements that were created during the given date interval. */ @@ -27147,7 +27564,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27175,7 +27594,7 @@ export interface operations { }; }; }; - "GetIssuingSettlementsSettlement": { + GetIssuingSettlementsSettlement: { /** @description

Retrieves an Issuing Settlement object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -27187,7 +27606,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27204,7 +27625,7 @@ export interface operations { }; }; }; - "PostIssuingSettlementsSettlement": { + PostIssuingSettlementsSettlement: { /** @description

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

*/ parameters: { path: { @@ -27212,12 +27633,14 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -27236,7 +27659,7 @@ export interface operations { }; }; }; - "GetIssuingTransactions": { + GetIssuingTransactions: { /** @description

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

*/ parameters?: { /** @description Only return transactions that belong to the given card. */ @@ -27264,7 +27687,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27292,7 +27717,7 @@ export interface operations { }; }; }; - "GetIssuingTransactionsTransaction": { + GetIssuingTransactionsTransaction: { /** @description

Retrieves an Issuing Transaction object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -27304,7 +27729,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27321,7 +27748,7 @@ export interface operations { }; }; }; - "PostIssuingTransactionsTransaction": { + PostIssuingTransactionsTransaction: { /** @description

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

*/ parameters: { path: { @@ -27329,13 +27756,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -27353,37 +27782,39 @@ export interface operations { }; }; }; - "PostLinkAccountSessions": { + PostLinkAccountSessions: { /** @description

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

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

Retrieves the details of a Financial Connections Session

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -27413,7 +27844,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27430,7 +27863,7 @@ export interface operations { }; }; }; - "GetLinkedAccounts": { + GetLinkedAccounts: { /** @description

Returns a list of Financial Connections Account objects.

*/ parameters?: { /** @description If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ @@ -27452,7 +27885,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27481,7 +27916,7 @@ export interface operations { }; }; }; - "GetLinkedAccountsAccount": { + GetLinkedAccountsAccount: { /** @description

Retrieves the details of an Financial Connections Account.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -27493,7 +27928,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27510,7 +27947,7 @@ export interface operations { }; }; }; - "PostLinkedAccountsAccountDisconnect": { + PostLinkedAccountsAccountDisconnect: { /** @description

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

*/ parameters: { path: { @@ -27518,9 +27955,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -27538,7 +27977,7 @@ export interface operations { }; }; }; - "GetLinkedAccountsAccountOwners": { + GetLinkedAccountsAccountOwners: { /** @description

Lists all owners for a given Account

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -27558,7 +27997,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27587,7 +28028,7 @@ export interface operations { }; }; }; - "PostLinkedAccountsAccountRefresh": { + PostLinkedAccountsAccountRefresh: { /** @description

Refreshes the data associated with a Financial Connections Account.

*/ parameters: { path: { @@ -27595,11 +28036,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The list of account features that you would like to refresh. */ - features: ("balance" | "ownership")[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The list of account features that you would like to refresh. */ + features: ("balance" | "ownership")[]; + }; }; }; responses: { @@ -27617,7 +28060,7 @@ export interface operations { }; }; }; - "GetMandatesMandate": { + GetMandatesMandate: { /** @description

Retrieves a Mandate object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -27629,7 +28072,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27646,7 +28091,7 @@ export interface operations { }; }; }; - "GetOrders": { + GetOrders: { /** @description

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

*/ parameters?: { /** @description Only return orders for the given customer. */ @@ -27663,7 +28108,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -27691,312 +28138,314 @@ export interface operations { }; }; }; - "PostOrders": { + PostOrders: { /** @description

Creates a new open order object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * automatic_tax - * @description Settings for automatic tax calculation for this order. - */ - automatic_tax?: { - enabled: boolean; - }; - /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ - billing_details?: { - /** validated_optional_fields_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean; }; - email?: string; - name?: string; - phone?: string; - } | ""; - /** - * client_permissions - * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. - */ - client_permissions?: { - /** @enum {string} */ - billing_details?: "allow" | "disallow"; - /** @enum {string} */ - promotion_codes?: "allow" | "disallow"; - /** @enum {string} */ - shipping_details?: "allow" | "disallow"; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description The customer associated with this order. */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ - discounts?: ({ - coupon?: string; - discount?: string; - promotion_code?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The IP address of the purchaser for this order. */ - ip_address?: string; - /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items: ({ - description?: string; - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - price?: string; - /** price_data_with_optional_product */ - price_data?: { - currency?: string; - product?: string; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: { + /** validated_optional_fields_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - product?: string; - /** product_upsert_data */ - product_data?: { + email?: string; + name?: string; + phone?: string; + } | ""; + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. + */ + client_permissions?: { + /** @enum {string} */ + billing_details?: "allow" | "disallow"; + /** @enum {string} */ + promotion_codes?: "allow" | "disallow"; + /** @enum {string} */ + shipping_details?: "allow" | "disallow"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description The customer associated with this order. */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: ({ + coupon?: string; + discount?: string; + promotion_code?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The IP address of the purchaser for this order. */ + ip_address?: string; + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: ({ description?: string; - id: string; - images?: (string)[] | ""; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - name: string; - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; - } | ""; - shippable?: boolean; - tax_code?: string; - url?: string | ""; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * create_params - * @description Payment information associated with the order, including payment settings. - */ - payment?: { - /** create_params */ - settings: { - application_fee_amount?: number; + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + price?: string; + /** price_data_with_optional_product */ + price_data?: { + currency?: string; + product?: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + product?: string; + /** product_upsert_data */ + product_data?: { + description?: string; + id: string; + images?: (string)[] | ""; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + name: string; + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + } | ""; + shippable?: boolean; + tax_code?: string; + url?: string | ""; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { /** create_params */ - payment_method_options?: { - /** payment_intent_payment_method_options_param */ - acss_debit?: { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - interval_description?: string; + settings: { + application_fee_amount?: number; + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + setup_future_usage?: "" | "none" | "off_session" | "on_session"; /** @enum {string} */ - transaction_type?: "business" | "personal"; + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }; - /** afterpay_clearpay_payment_method_options_param */ - afterpay_clearpay?: { - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - reference?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - alipay?: { - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }; - /** payment_method_options_param */ - bancontact?: { - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }; - /** card_payment_method_options */ - card?: { - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - }; - /** payment_intent_payment_method_options_param */ - customer_balance?: { - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + wechat_pay?: { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - ideal?: { - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }; - /** payment_method_options_param */ - klarna?: { - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_intent_payment_method_options_param */ - link?: { - /** @enum {string} */ - capture_method?: "" | "manual"; - persistent_token?: string; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }; - /** payment_method_options_param */ - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - }; - /** payment_method_options_param */ - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - }; - /** payment_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }; - /** payment_method_options_param */ - sofort?: { - /** @enum {string} */ - preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; }; - /** payment_method_options_param */ - wechat_pay?: { - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; + payment_method_types?: ("acss_debit" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "link" | "oxxo" | "p24" | "sepa_debit" | "sofort" | "wechat_pay")[]; + return_url?: string; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + /** transfer_data */ + transfer_data?: { + amount?: number; + destination: string; }; }; - payment_method_types?: ("acss_debit" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "link" | "oxxo" | "p24" | "sepa_debit" | "sofort" | "wechat_pay")[]; - return_url?: string; - statement_descriptor?: string; - statement_descriptor_suffix?: string; - /** transfer_data */ - transfer_data?: { - amount?: number; - destination: string; - }; }; - }; - /** @description Settings for the customer cost of shipping for this order. */ - shipping_cost?: ({ - shipping_rate?: string; - /** method_params */ - shipping_rate_data?: { - /** delivery_estimate */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: ({ + shipping_rate?: string; + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; }; - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + display_name: string; + /** fixed_amount */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: ({ + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }) | undefined; + }; }; - }; - display_name: string; - /** fixed_amount */ - fixed_amount?: { - amount: number; - currency: string; - currency_options?: { - [key: string]: ({ - amount: number; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - }) | undefined; + metadata?: { + [key: string]: string | undefined; }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_code?: string; + /** @enum {string} */ + type?: "fixed_amount"; }; - metadata?: { - [key: string]: string | undefined; + }) | ""; + /** @description Shipping details for the order. */ + shipping_details?: { + /** validated_optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tax_code?: string; - /** @enum {string} */ - type?: "fixed_amount"; - }; - }) | ""; - /** @description Shipping details for the order. */ - shipping_details?: { - /** validated_optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + name: string; + phone?: string; + } | ""; + /** + * tax_details + * @description Additional tax details about the purchaser to be used for this order. + */ + tax_details?: { + /** @enum {string} */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + tax_ids?: ({ + /** @enum {string} */ + type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; + value: string; + })[]; }; - name: string; - phone?: string; - } | ""; - /** - * tax_details - * @description Additional tax details about the purchaser to be used for this order. - */ - tax_details?: { - /** @enum {string} */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; - tax_ids?: ({ - /** @enum {string} */ - type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; - value: string; - })[]; }; }; }; @@ -28015,7 +28464,7 @@ export interface operations { }; }; }; - "GetOrdersId": { + GetOrdersId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -28027,7 +28476,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -28044,7 +28495,7 @@ export interface operations { }; }; }; - "PostOrdersId": { + PostOrdersId: { /** @description

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

*/ parameters: { path: { @@ -28052,295 +28503,297 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * automatic_tax - * @description Settings for automatic tax calculation for this order. - */ - automatic_tax?: { - enabled: boolean; - }; - /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ - billing_details?: { - /** validated_optional_fields_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean; }; - email?: string; - name?: string; - phone?: string; - } | ""; - /** - * client_permissions - * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. - */ - client_permissions?: { - /** @enum {string} */ - billing_details?: "allow" | "disallow"; - /** @enum {string} */ - promotion_codes?: "allow" | "disallow"; - /** @enum {string} */ - shipping_details?: "allow" | "disallow"; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description The customer associated with this order. */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ - discounts?: ({ - coupon?: string; - discount?: string; - promotion_code?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The IP address of the purchaser for this order. */ - ip_address?: string; - /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: ({ - description?: string; - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - id?: string; - price?: string; - /** price_data_with_optional_product */ - price_data?: { - currency?: string; - product?: string; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: { + /** validated_optional_fields_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - product?: string; - /** product_upsert_data */ - product_data?: { + email?: string; + name?: string; + phone?: string; + } | ""; + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. + */ + client_permissions?: { + /** @enum {string} */ + billing_details?: "allow" | "disallow"; + /** @enum {string} */ + promotion_codes?: "allow" | "disallow"; + /** @enum {string} */ + shipping_details?: "allow" | "disallow"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description The customer associated with this order. */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: ({ + coupon?: string; + discount?: string; + promotion_code?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The IP address of the purchaser for this order. */ + ip_address?: string; + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ description?: string; - id: string; - images?: (string)[] | ""; - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - name: string; - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; - } | ""; - shippable?: boolean; - tax_code?: string; - url?: string | ""; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * update_params - * @description Payment information associated with the order, including payment settings. - */ - payment?: { - /** update_params */ - settings: { - application_fee_amount?: number | ""; + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + id?: string; + price?: string; + /** price_data_with_optional_product */ + price_data?: { + currency?: string; + product?: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + product?: string; + /** product_upsert_data */ + product_data?: { + description?: string; + id: string; + images?: (string)[] | ""; + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + name: string; + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + } | ""; + shippable?: boolean; + tax_code?: string; + url?: string | ""; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { /** update_params */ - payment_method_options?: { - acss_debit?: ({ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - interval_description?: string; + settings: { + application_fee_amount?: number | ""; + /** update_params */ + payment_method_options?: { + acss_debit?: ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + setup_future_usage?: "" | "none" | "off_session" | "on_session"; /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - afterpay_clearpay?: ({ - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - reference?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - alipay?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - bancontact?: ({ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - card?: ({ - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - /** @enum {string} */ - setup_future_usage?: "none" | "off_session" | "on_session"; - }) | ""; - customer_balance?: ({ - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + afterpay_clearpay?: ({ + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + alipay?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + bancontact?: ({ + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + card?: ({ + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }) | ""; + customer_balance?: ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; - }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - ideal?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - klarna?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - link?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - persistent_token?: string; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + ideal?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + klarna?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + link?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } | ""; + sepa_debit?: ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + sofort?: ({ + /** @enum {string} */ + preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + wechat_pay?: ({ + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + }; + payment_method_types?: ("acss_debit" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "link" | "oxxo" | "p24" | "sepa_debit" | "sofort" | "wechat_pay")[]; + return_url?: string | ""; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + transfer_data?: { + amount?: number; + destination: string; } | ""; - sepa_debit?: ({ - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - sofort?: ({ - /** @enum {string} */ - preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - wechat_pay?: ({ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; }; - payment_method_types?: ("acss_debit" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "link" | "oxxo" | "p24" | "sepa_debit" | "sofort" | "wechat_pay")[]; - return_url?: string | ""; - statement_descriptor?: string; - statement_descriptor_suffix?: string; - transfer_data?: { - amount?: number; - destination: string; - } | ""; }; - }; - /** @description Settings for the customer cost of shipping for this order. */ - shipping_cost?: ({ - shipping_rate?: string; - /** method_params */ - shipping_rate_data?: { - /** delivery_estimate */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: ({ + shipping_rate?: string; + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; }; - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + display_name: string; + /** fixed_amount */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: ({ + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }) | undefined; + }; }; - }; - display_name: string; - /** fixed_amount */ - fixed_amount?: { - amount: number; - currency: string; - currency_options?: { - [key: string]: ({ - amount: number; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - }) | undefined; + metadata?: { + [key: string]: string | undefined; }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_code?: string; + /** @enum {string} */ + type?: "fixed_amount"; }; - metadata?: { - [key: string]: string | undefined; + }) | ""; + /** @description Shipping details for the order. */ + shipping_details?: { + /** validated_optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tax_code?: string; - /** @enum {string} */ - type?: "fixed_amount"; - }; - }) | ""; - /** @description Shipping details for the order. */ - shipping_details?: { - /** validated_optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + name: string; + phone?: string; + } | ""; + /** + * tax_details + * @description Additional tax details about the purchaser to be used for this order. + */ + tax_details?: { + /** @enum {string} */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + tax_ids?: ({ + /** @enum {string} */ + type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; + value: string; + })[]; }; - name: string; - phone?: string; - } | ""; - /** - * tax_details - * @description Additional tax details about the purchaser to be used for this order. - */ - tax_details?: { - /** @enum {string} */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; - tax_ids?: ({ - /** @enum {string} */ - type: "ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "us_ein" | "za_vat"; - value: string; - })[]; }; }; }; @@ -28359,7 +28812,7 @@ export interface operations { }; }; }; - "PostOrdersIdCancel": { + PostOrdersIdCancel: { /** @description

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

*/ parameters: { path: { @@ -28367,9 +28820,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -28387,7 +28842,7 @@ export interface operations { }; }; }; - "GetOrdersIdLineItems": { + GetOrdersIdLineItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -28405,7 +28860,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -28434,7 +28891,7 @@ export interface operations { }; }; }; - "PostOrdersIdReopen": { + PostOrdersIdReopen: { /** @description

Reopens a submitted order.

*/ parameters: { path: { @@ -28442,9 +28899,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -28462,7 +28921,7 @@ export interface operations { }; }; }; - "PostOrdersIdSubmit": { + PostOrdersIdSubmit: { /** @description

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

*/ parameters: { path: { @@ -28470,11 +28929,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ - expected_total: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number; + }; }; }; responses: { @@ -28492,7 +28953,7 @@ export interface operations { }; }; }; - "GetPaymentIntents": { + GetPaymentIntents: { /** @description

Returns a list of PaymentIntents.

*/ parameters?: { /** @description A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ @@ -28516,7 +28977,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -28544,7 +29007,7 @@ export interface operations { }; }; }; - "PostPaymentIntents": { + PostPaymentIntents: { /** * @description

Creates a PaymentIntent object.

* @@ -28558,491 +29021,493 @@ export interface operations { * is supplied.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number; - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number; - /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. - */ - automatic_payment_methods?: { - enabled: boolean; - }; - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method?: "automatic" | "manual"; - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean; - /** @enum {string} */ - confirmation_method?: "automatic" | "manual"; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string; - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: Record; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; - }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: boolean | ("one_off" | "recurring"); - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string; - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string; - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + content: { + "application/x-www-form-urlencoded": { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number; + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean; }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "automatic" | "manual"; + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean; + /** @enum {string} */ + confirmation_method?: "automatic" | "manual"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + error_on_requires_action?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + mandate?: string; + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: Record; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; }; }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: ({ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - interval_description?: string; - /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; - /** @enum {string} */ - transaction_type?: "business" | "personal"; + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + off_session?: boolean | ("one_off" | "recurring"); + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string; + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ + payment_method?: string; + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; }; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - affirm?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - afterpay_clearpay?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - reference?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - alipay?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - au_becs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bacs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bancontact?: ({ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - blik?: { - code?: string; - } | ""; - boleto?: ({ - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - card?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: { - count: number; - /** @enum {string} */ - interval: "month"; - /** @enum {string} */ - type: "fixed_count"; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; }; - /** mandate_options_param */ - mandate_options?: { - amount: number; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - amount_type: "fixed" | "maximum"; - description?: string; - /** Format: unix-time */ - end_date?: number; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; - /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; }; - /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - statement_descriptor_suffix_kana?: string | ""; - statement_descriptor_suffix_kanji?: string | ""; - }) | ""; - card_present?: { - request_extended_authorization?: boolean; - request_incremental_authorization_support?: boolean; - } | ""; - customer_balance?: ({ - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - eps?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - fpx?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - giropay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - grabpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - ideal?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - interac_present?: Record | ""; - klarna?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - konbini?: ({ - confirmation_number?: string; - expires_after_days?: number | ""; - expires_at?: number | ""; - product_description?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - link?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - persistent_token?: string; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - } | ""; - paynow?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - pix?: { - expires_after_seconds?: number; - /** Format: unix-time */ - expires_at?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - promptpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - sepa_debit?: ({ - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - sofort?: ({ - /** @enum {string} */ - preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - us_bank_account?: ({ - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - wechat_pay?: ({ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: (string)[]; - /** - * radar_options - * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - */ - radar_options?: { - session?: string; - }; - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string; - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string; - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: "off_session" | "on_session"; - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }; - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string; - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string; - /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number; - destination: string; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + affirm?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + afterpay_clearpay?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + alipay?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + au_becs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bacs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bancontact?: ({ + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + blik?: { + code?: string; + } | ""; + boleto?: ({ + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + card?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + }) | ""; + card_present?: { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } | ""; + customer_balance?: ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + eps?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + fpx?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + giropay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + grabpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + ideal?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + interac_present?: Record | ""; + klarna?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + konbini?: ({ + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + link?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } | ""; + paynow?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + pix?: { + expires_after_seconds?: number; + /** Format: unix-time */ + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + promptpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + sepa_debit?: ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + sofort?: ({ + /** @enum {string} */ + preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + us_bank_account?: ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + wechat_pay?: ({ + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + }; + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: (string)[]; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string; + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + return_url?: string; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "off_session" | "on_session"; + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }; + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string; + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number; + destination: string; + }; + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string; + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean; }; - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string; - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean; }; }; responses: { @@ -29060,7 +29525,7 @@ export interface operations { }; }; }; - "GetPaymentIntentsSearch": { + GetPaymentIntentsSearch: { /** * @description

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -29080,7 +29545,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -29109,7 +29576,7 @@ export interface operations { }; }; }; - "GetPaymentIntentsIntent": { + GetPaymentIntentsIntent: { /** * @description

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

* @@ -29129,7 +29596,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -29146,7 +29615,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntent": { + PostPaymentIntentsIntent: { /** * @description

Updates properties on a PaymentIntent object without confirming.

* @@ -29162,434 +29631,436 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number; - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | ""; - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method?: "automatic" | "manual"; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string; - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; - }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; - }; - }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; - metadata?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | ""; + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "automatic" | "manual"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string | undefined; - }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: ({ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - interval_description?: string; + }) | ""; + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string; + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - transaction_type?: "business" | "personal"; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; + }; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { + /** @enum {string} */ + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - affirm?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - afterpay_clearpay?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - reference?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - alipay?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - au_becs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bacs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bancontact?: ({ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - blik?: { - code?: string; - } | ""; - boleto?: ({ - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - card?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: { - count: number; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; + }; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; /** @enum {string} */ - interval: "month"; + payment_schedule?: "combined" | "interval" | "sporadic"; /** @enum {string} */ - type: "fixed_count"; - } | ""; - }; - /** mandate_options_param */ - mandate_options?: { - amount: number; + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - amount_type: "fixed" | "maximum"; - description?: string; - /** Format: unix-time */ - end_date?: number; + setup_future_usage?: "" | "none" | "off_session" | "on_session"; /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + affirm?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + afterpay_clearpay?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + alipay?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + au_becs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bacs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bancontact?: ({ + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + blik?: { + code?: string; + } | ""; + boleto?: ({ + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + card?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + }) | ""; + card_present?: { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } | ""; + customer_balance?: ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + eps?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + fpx?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + giropay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + grabpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + ideal?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + interac_present?: Record | ""; + klarna?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + konbini?: ({ + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + link?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } | ""; + paynow?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + pix?: { + expires_after_seconds?: number; /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; - }; - /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - statement_descriptor_suffix_kana?: string | ""; - statement_descriptor_suffix_kanji?: string | ""; - }) | ""; - card_present?: { - request_extended_authorization?: boolean; - request_incremental_authorization_support?: boolean; - } | ""; - customer_balance?: ({ - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + promptpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + sepa_debit?: ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + sofort?: ({ + /** @enum {string} */ + preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + us_bank_account?: ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + wechat_pay?: ({ + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + }; + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: (string)[]; + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | ""; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** @description Shipping information for this PaymentIntent. */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - eps?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - fpx?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - giropay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - grabpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - ideal?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - interac_present?: Record | ""; - klarna?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - konbini?: ({ - confirmation_number?: string; - expires_after_days?: number | ""; - expires_at?: number | ""; - product_description?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - link?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - persistent_token?: string; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - } | ""; - paynow?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - pix?: { - expires_after_seconds?: number; - /** Format: unix-time */ - expires_at?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - promptpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; } | ""; - sepa_debit?: ({ - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - sofort?: ({ - /** @enum {string} */ - preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - us_bank_account?: ({ - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; - }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; - }; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - wechat_pay?: ({ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: (string)[]; - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | ""; - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: "" | "off_session" | "on_session"; - /** @description Shipping information for this PaymentIntent. */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string; + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number; }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - } | ""; - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string; - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string; - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number; + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string; }; - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string; }; }; responses: { @@ -29607,7 +30078,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentApplyCustomerBalance": { + PostPaymentIntentsIntentApplyCustomerBalance: { /** @description

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ parameters: { path: { @@ -29615,21 +30086,23 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. - * - * A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - * - * The maximum amount is the amount of the PaymentIntent. - * - * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. - */ - amount?: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * + * The maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -29647,7 +30120,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentCancel": { + PostPaymentIntentsIntentCancel: { /** * @description

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

* @@ -29661,14 +30134,16 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: "abandoned" | "duplicate" | "fraudulent" | "requested_by_customer"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * @enum {string} + */ + cancellation_reason?: "abandoned" | "duplicate" | "fraudulent" | "requested_by_customer"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -29686,7 +30161,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentCapture": { + PostPaymentIntentsIntentCapture: { /** * @description

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

* @@ -29700,24 +30175,26 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number; - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string; - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string; - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string; + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number; + }; }; }; }; @@ -29736,7 +30213,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentConfirm": { + PostPaymentIntentsIntentConfirm: { /** * @description

Confirm that your customer intends to pay with current or provided * payment method. Upon confirmation, the PaymentIntent will attempt to initiate @@ -29767,452 +30244,454 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method?: "automatic" | "manual"; - /** @description The client secret of the PaymentIntent. */ - client_secret?: string; - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ - error_on_requires_action?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description ID of the mandate to be used for this payment. */ - mandate?: string; - /** @description This hash contains details about the Mandate to create */ - mandate_data?: ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: Record; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "automatic" | "manual"; + /** @description The client secret of the PaymentIntent. */ + client_secret?: string; + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description ID of the mandate to be used for this payment. */ + mandate?: string; + /** @description This hash contains details about the Mandate to create */ + mandate_data?: ({ + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: Record; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }) | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string; - user_agent?: string; + }) | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string; + user_agent?: string; + }; + /** @enum {string} */ + type: "online"; }; - /** @enum {string} */ - type: "online"; - }; - }; - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - off_session?: boolean | ("one_off" | "recurring"); - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string; - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; - }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: boolean | ("one_off" | "recurring"); + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string; + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; }; - }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; - metadata?: { - [key: string]: string | undefined; - }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: ({ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - interval_description?: string; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - transaction_type?: "business" | "personal"; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; + }; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { + /** @enum {string} */ + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - affirm?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - afterpay_clearpay?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - reference?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - alipay?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - au_becs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bacs_debit?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - bancontact?: ({ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - blik?: { - code?: string; - } | ""; - boleto?: ({ - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - card?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: { - count: number; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; + }; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; /** @enum {string} */ - interval: "month"; + payment_schedule?: "combined" | "interval" | "sporadic"; /** @enum {string} */ - type: "fixed_count"; - } | ""; - }; - /** mandate_options_param */ - mandate_options?: { - amount: number; + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + affirm?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + afterpay_clearpay?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + alipay?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + au_becs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bacs_debit?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + bancontact?: ({ + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + blik?: { + code?: string; + } | ""; + boleto?: ({ + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + card?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + }) | ""; + card_present?: { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } | ""; + customer_balance?: ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** @enum {string} */ + type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + eps?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + fpx?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + giropay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + grabpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + ideal?: ({ + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + interac_present?: Record | ""; + klarna?: ({ /** @enum {string} */ - amount_type: "fixed" | "maximum"; - description?: string; - /** Format: unix-time */ - end_date?: number; + capture_method?: "" | "manual"; /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; + preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + konbini?: ({ + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }) | ""; + link?: ({ + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } | ""; + paynow?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + pix?: { + expires_after_seconds?: number; /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; - }; - /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - statement_descriptor_suffix_kana?: string | ""; - statement_descriptor_suffix_kanji?: string | ""; - }) | ""; - card_present?: { - request_extended_authorization?: boolean; - request_incremental_authorization_support?: boolean; - } | ""; - customer_balance?: ({ - /** bank_transfer_param */ - bank_transfer?: { - /** eu_bank_transfer_params */ - eu_bank_transfer?: { - country: string; + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + promptpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + } | ""; + sepa_debit?: ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + }) | ""; + sofort?: ({ + /** @enum {string} */ + preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }) | ""; + us_bank_account?: ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; }; - requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[]; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }) | ""; + wechat_pay?: ({ + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; /** @enum {string} */ - type: "eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer"; + setup_future_usage?: "none"; + }) | ""; + }; + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: (string)[]; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | ""; + /** + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** @description Shipping information for this PaymentIntent. */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - /** @enum {string} */ - funding_type?: "bank_transfer"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - eps?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - fpx?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - giropay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - grabpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - ideal?: ({ - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - interac_present?: Record | ""; - klarna?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - /** @enum {string} */ - preferred_locale?: "da-DK" | "de-AT" | "de-CH" | "de-DE" | "en-AT" | "en-AU" | "en-BE" | "en-CA" | "en-CH" | "en-DE" | "en-DK" | "en-ES" | "en-FI" | "en-FR" | "en-GB" | "en-IE" | "en-IT" | "en-NL" | "en-NO" | "en-NZ" | "en-PL" | "en-PT" | "en-SE" | "en-US" | "es-ES" | "es-US" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "it-CH" | "it-IT" | "nb-NO" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-PT" | "sv-FI" | "sv-SE"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - konbini?: ({ - confirmation_number?: string; - expires_after_days?: number | ""; - expires_at?: number | ""; - product_description?: string; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; - link?: ({ - /** @enum {string} */ - capture_method?: "" | "manual"; - persistent_token?: string; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - oxxo?: { - expires_after_days?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - p24?: { - /** @enum {string} */ - setup_future_usage?: "none"; - tos_shown_and_accepted?: boolean; - } | ""; - paynow?: { - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - pix?: { - expires_after_seconds?: number; - /** Format: unix-time */ - expires_at?: number; - /** @enum {string} */ - setup_future_usage?: "none"; - } | ""; - promptpay?: { - /** @enum {string} */ - setup_future_usage?: "none"; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; } | ""; - sepa_debit?: ({ - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }) | ""; - sofort?: ({ - /** @enum {string} */ - preferred_language?: "" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session"; - }) | ""; - us_bank_account?: ({ - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; - }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; - }; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }) | ""; - wechat_pay?: ({ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - /** @enum {string} */ - setup_future_usage?: "none"; - }) | ""; + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean; }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: (string)[]; - /** - * radar_options - * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - */ - radar_options?: { - session?: string; - }; - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | ""; - /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string; - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: "" | "off_session" | "on_session"; - /** @description Shipping information for this PaymentIntent. */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - } | ""; - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean; }; }; responses: { @@ -30230,7 +30709,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentIncrementAuthorization": { + PostPaymentIntentsIntentIncrementAuthorization: { /** * @description

Perform an incremental authorization on an eligible * PaymentIntent. To be eligible, the @@ -30263,28 +30742,30 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ - amount: number; - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string; - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment is captured. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string; + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number; + }; }; }; }; @@ -30303,7 +30784,7 @@ export interface operations { }; }; }; - "PostPaymentIntentsIntentVerifyMicrodeposits": { + PostPaymentIntentsIntentVerifyMicrodeposits: { /** @description

Verifies microdeposits on a PaymentIntent object.

*/ parameters: { path: { @@ -30311,15 +30792,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: (number)[]; - /** @description The client secret of the PaymentIntent. */ - client_secret?: string; - /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ - descriptor_code?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: (number)[]; + /** @description The client secret of the PaymentIntent. */ + client_secret?: string; + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -30337,7 +30820,7 @@ export interface operations { }; }; }; - "GetPaymentLinks": { + GetPaymentLinks: { /** @description

Returns a list of your payment links.

*/ parameters?: { /** @description Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ @@ -30354,7 +30837,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -30382,148 +30867,150 @@ export interface operations { }; }; }; - "PostPaymentLinks": { + PostPaymentLinks: { /** @description

Creates a payment link.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string; + }; + /** after_completion_redirect_params */ + redirect?: { + url: string; + }; + /** @enum {string} */ + type: "hosted_confirmation" | "redirect"; }; - /** after_completion_redirect_params */ - redirect?: { - url: string; + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number; + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number; + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection?: "auto" | "required"; + /** + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: "auto" | "none"; + /** @enum {string} */ + terms_of_service?: "none" | "required"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string; + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: "always" | "if_required"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items: ({ + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean; + maximum?: number; + minimum?: number; + }; + price: string; + quantity: number; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string; + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: "off_session" | "on_session"; + }; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ("affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]; + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean; + }; + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; + }; + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: ({ + shipping_rate?: string; + })[]; + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: "auto" | "book" | "donate" | "pay"; + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + description?: string; + trial_period_days?: number; + }; + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean; + }; + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number; + destination: string; }; - /** @enum {string} */ - type: "hosted_confirmation" | "redirect"; - }; - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean; - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number; - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number; - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} - */ - billing_address_collection?: "auto" | "required"; - /** - * consent_collection_params - * @description Configure fields to gather active consent from customers. - */ - consent_collection?: { - /** @enum {string} */ - promotions?: "auto" | "none"; - /** @enum {string} */ - terms_of_service?: "none" | "required"; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ - currency?: string; - /** - * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - * @enum {string} - */ - customer_creation?: "always" | "if_required"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items: ({ - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean; - maximum?: number; - minimum?: number; - }; - price: string; - quantity: number; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string; - /** - * payment_intent_data_params - * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - */ - payment_intent_data?: { - /** @enum {string} */ - capture_method?: "automatic" | "manual"; - /** @enum {string} */ - setup_future_usage?: "off_session" | "on_session"; - }; - /** - * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - * - * Can only be set in `subscription` mode. - * - * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - * @enum {string} - */ - payment_method_collection?: "always" | "if_required"; - /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: ("affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]; - /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. - * - * We recommend that you review your privacy policy and check with your legal contacts. - */ - phone_number_collection?: { - enabled: boolean; - }; - /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. - */ - shipping_address_collection?: { - allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; - }; - /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - shipping_options?: ({ - shipping_rate?: string; - })[]; - /** - * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). - * @enum {string} - */ - submit_type?: "auto" | "book" | "donate" | "pay"; - /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - */ - subscription_data?: { - description?: string; - trial_period_days?: number; - }; - /** - * tax_id_collection_params - * @description Controls tax ID collection during checkout. - */ - tax_id_collection?: { - enabled: boolean; - }; - /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - */ - transfer_data?: { - amount?: number; - destination: string; }; }; }; @@ -30542,7 +31029,7 @@ export interface operations { }; }; }; - "GetPaymentLinksPaymentLink": { + GetPaymentLinksPaymentLink: { /** @description

Retrieve a payment link.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -30554,7 +31041,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -30571,7 +31060,7 @@ export interface operations { }; }; }; - "PostPaymentLinksPaymentLink": { + PostPaymentLinksPaymentLink: { /** @description

Updates a payment link.

*/ parameters: { path: { @@ -30579,76 +31068,78 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean; - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ + active?: boolean; + /** + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string; + }; + /** after_completion_redirect_params */ + redirect?: { + url: string; + }; + /** @enum {string} */ + type: "hosted_confirmation" | "redirect"; }; - /** after_completion_redirect_params */ - redirect?: { - url: string; + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean; + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean; }; - /** @enum {string} */ - type: "hosted_confirmation" | "redirect"; - }; - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean; - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} - */ - billing_address_collection?: "auto" | "required"; - /** - * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - * @enum {string} - */ - customer_creation?: "always" | "if_required"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: ({ - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean; - maximum?: number; - minimum?: number; - }; - id: string; - quantity?: number; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { - [key: string]: string | undefined; + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection?: "auto" | "required"; + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: "always" | "if_required"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: ({ + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean; + maximum?: number; + minimum?: number; + }; + id: string; + quantity?: number; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: (("affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]) | ""; + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: ({ + allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; + }) | ""; }; - /** - * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - * - * Can only be set in `subscription` mode. - * - * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - * @enum {string} - */ - payment_method_collection?: "always" | "if_required"; - /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: (("affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[]) | ""; - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: ({ - allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[]; - }) | ""; }; }; responses: { @@ -30666,7 +31157,7 @@ export interface operations { }; }; }; - "GetPaymentLinksPaymentLinkLineItems": { + GetPaymentLinksPaymentLinkLineItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -30684,7 +31175,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -30713,7 +31206,7 @@ export interface operations { }; }; }; - "GetPaymentMethods": { + GetPaymentMethods: { /** @description

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

*/ parameters: { /** @description The ID of the customer whose PaymentMethods will be retrieved. */ @@ -30732,7 +31225,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -30760,246 +31255,248 @@ export interface operations { }; }; }; - "PostPaymentMethods": { + PostPaymentMethods: { /** * @description

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

* *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** - * param - * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - */ - affirm?: Record; - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - */ - afterpay_clearpay?: Record; - /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - */ - alipay?: Record; - /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - */ - bancontact?: Record; - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** - * param - * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - */ - blik?: Record; - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string; - }; - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: { - cvc?: string; - exp_month: number; - exp_year: number; - number: string; - } | { - token: string; - }; - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string; - /** - * param - * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - */ - customer_balance?: Record; - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: Record; - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: Record; - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; - }; - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: Record; - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; + content: { + "application/x-www-form-urlencoded": { + /** + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; }; + /** + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + */ + affirm?: Record; + /** + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + afterpay_clearpay?: Record; + /** + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + alipay?: Record; + /** + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: Record; + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: Record; + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string; + }; + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: { + cvc?: string; + exp_month: number; + exp_year: number; + number: string; + } | { + token: string; + }; + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string; + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: Record; + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; + }; + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: Record; + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: Record; + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: Record; + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: Record; + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: Record; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: Record; + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** @description The PaymentMethod to share. */ + payment_method?: string; + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: Record; + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: Record; + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: Record; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string; + }; + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; + }; + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: Record; }; - /** - * param - * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - */ - konbini?: Record; - /** - * param - * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - */ - link?: Record; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: Record; - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** @description The PaymentMethod to share. */ - payment_method?: string; - /** - * param - * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - */ - paynow?: Record; - /** - * param - * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - */ - pix?: Record; - /** - * param - * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - */ - promptpay?: Record; - /** - * radar_options - * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - */ - radar_options?: { - session?: string; - }; - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string; - }; - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** - * payment_method_param - * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: Record; }; }; responses: { @@ -31017,7 +31514,7 @@ export interface operations { }; }; }; - "GetPaymentMethodsPaymentMethod": { + GetPaymentMethodsPaymentMethod: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -31029,7 +31526,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31046,7 +31545,7 @@ export interface operations { }; }; }; - "PostPaymentMethodsPaymentMethod": { + PostPaymentMethodsPaymentMethod: { /** @description

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

*/ parameters: { path: { @@ -31054,50 +31553,52 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number; - exp_year?: number; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * param - * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - */ - link?: Record; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * update_param - * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; + content: { + "application/x-www-form-urlencoded": { + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number; + exp_year?: number; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: Record; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + }; }; }; }; @@ -31116,7 +31617,7 @@ export interface operations { }; }; }; - "PostPaymentMethodsPaymentMethodAttach": { + PostPaymentMethodsPaymentMethodAttach: { /** * @description

Attaches a PaymentMethod object to a Customer.

* @@ -31138,11 +31639,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -31160,7 +31663,7 @@ export interface operations { }; }; }; - "PostPaymentMethodsPaymentMethodDetach": { + PostPaymentMethodsPaymentMethodDetach: { /** @description

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

*/ parameters: { path: { @@ -31168,9 +31671,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -31188,7 +31693,7 @@ export interface operations { }; }; }; - "GetPayouts": { + GetPayouts: { /** @description

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

*/ parameters?: { /** @description The ID of an external account - only return payouts sent to this external account. */ @@ -31219,7 +31724,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31247,7 +31754,7 @@ export interface operations { }; }; }; - "PostPayouts": { + PostPayouts: { /** * @description

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

* @@ -31256,33 +31763,35 @@ export interface operations { *

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description A positive integer in cents representing how much to payout. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer in cents representing how much to payout. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} + */ + method?: "instant" | "standard"; + /** + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} + */ + source_type?: "bank_account" | "card" | "fpx"; + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ + statement_descriptor?: string; }; - /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) - * @enum {string} - */ - method?: "instant" | "standard"; - /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. - * @enum {string} - */ - source_type?: "bank_account" | "card" | "fpx"; - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string; }; }; responses: { @@ -31300,7 +31809,7 @@ export interface operations { }; }; }; - "GetPayoutsPayout": { + GetPayoutsPayout: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -31312,7 +31821,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31329,7 +31840,7 @@ export interface operations { }; }; }; - "PostPayoutsPayout": { + PostPayoutsPayout: { /** @description

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

*/ parameters: { path: { @@ -31337,13 +31848,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -31361,7 +31874,7 @@ export interface operations { }; }; }; - "PostPayoutsPayoutCancel": { + PostPayoutsPayoutCancel: { /** @description

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

*/ parameters: { path: { @@ -31369,9 +31882,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -31389,7 +31904,7 @@ export interface operations { }; }; }; - "PostPayoutsPayoutReverse": { + PostPayoutsPayoutReverse: { /** * @description

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

* @@ -31401,12 +31916,14 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; }; }; }; @@ -31425,7 +31942,7 @@ export interface operations { }; }; }; - "GetPlans": { + GetPlans: { /** @description

Returns a list of your plans.

*/ parameters?: { /** @description Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ @@ -31451,7 +31968,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31480,90 +31999,92 @@ export interface operations { }; }; }; - "PostPlans": { + PostPlans: { /** @description

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - active?: boolean; - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; - /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number; - /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - */ - amount_decimal?: string; - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: "per_unit" | "tiered"; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string; - /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: "day" | "month" | "week" | "year"; - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string; - product?: ({ + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ active?: boolean; + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number; + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string; + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: "per_unit" | "tiered"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ id?: string; - metadata?: { + /** + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: "day" | "month" | "week" | "year"; + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string | undefined; - }; - name: string; - statement_descriptor?: string; - tax_code?: string; - unit_label?: string; - }) | string; - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: ({ - flat_amount?: number; - /** Format: decimal */ - flat_amount_decimal?: string; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - up_to: "inf" | number; - })[]; - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: "graduated" | "volume"; - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number; - /** @enum {string} */ - round: "down" | "up"; + }) | ""; + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string; + product?: ({ + active?: boolean; + id?: string; + metadata?: { + [key: string]: string | undefined; + }; + name: string; + statement_descriptor?: string; + tax_code?: string; + unit_label?: string; + }) | string; + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: ({ + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + })[]; + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: "graduated" | "volume"; + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number; + /** @enum {string} */ + round: "down" | "up"; + }; + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number; + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: "licensed" | "metered"; }; - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number; - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: "licensed" | "metered"; }; }; responses: { @@ -31581,7 +32102,7 @@ export interface operations { }; }; }; - "GetPlansPlan": { + GetPlansPlan: { /** @description

Retrieves the plan with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -31593,7 +32114,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31610,7 +32133,7 @@ export interface operations { }; }; }; - "PostPlansPlan": { + PostPlansPlan: { /** @description

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

*/ parameters: { path: { @@ -31618,21 +32141,23 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string; - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string; - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the plan is currently available for new subscriptions. */ + active?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string; + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string; + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number; + }; }; }; responses: { @@ -31650,7 +32175,7 @@ export interface operations { }; }; }; - "DeletePlansPlan": { + DeletePlansPlan: { /** @description

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

*/ parameters: { path: { @@ -31658,7 +32183,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31675,7 +32202,7 @@ export interface operations { }; }; }; - "GetPrices": { + GetPrices: { /** @description

Returns a list of your prices.

*/ parameters?: { /** @description Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ @@ -31714,7 +32241,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31743,133 +32272,135 @@ export interface operations { }; }; }; - "PostPrices": { + PostPrices: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean; - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: "per_unit" | "tiered"; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ - currency_options?: { - [key: string]: ({ - /** custom_unit_amount */ - custom_unit_amount?: { - enabled: boolean; - maximum?: number; - minimum?: number; - preset?: number; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tiers?: ({ - flat_amount?: number; - /** Format: decimal */ - flat_amount_decimal?: string; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - up_to: "inf" | number; - })[]; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }) | undefined; - }; - /** - * custom_unit_amount - * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - */ - custom_unit_amount?: { - enabled: boolean; - maximum?: number; - minimum?: number; - preset?: number; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description A brief description of the price, hidden from customers. */ - nickname?: string; - /** @description The ID of the product that this price will belong to. */ - product?: string; - /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. - */ - product_data?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ active?: boolean; - id?: string; + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: "per_unit" | "tiered"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: ({ + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: ({ + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + })[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }) | undefined; + }; + /** + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - name: string; - statement_descriptor?: string; - tax_code?: string; - unit_label?: string; - }; - /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. - */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - /** @enum {string} */ - usage_type?: "licensed" | "metered"; - }; - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: ({ - flat_amount?: number; - /** Format: decimal */ - flat_amount_decimal?: string; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - up_to: "inf" | number; - })[]; - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: "graduated" | "volume"; - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean; - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_quantity?: { - divide_by: number; - /** @enum {string} */ - round: "down" | "up"; + /** @description A brief description of the price, hidden from customers. */ + nickname?: string; + /** @description The ID of the product that this price will belong to. */ + product?: string; + /** + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. + */ + product_data?: { + active?: boolean; + id?: string; + metadata?: { + [key: string]: string | undefined; + }; + name: string; + statement_descriptor?: string; + tax_code?: string; + unit_label?: string; + }; + /** + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. + */ + recurring?: { + /** @enum {string} */ + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + /** @enum {string} */ + usage_type?: "licensed" | "metered"; + }; + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: ({ + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + })[]; + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: "graduated" | "volume"; + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean; + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number; + /** @enum {string} */ + round: "down" | "up"; + }; + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + unit_amount?: number; + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string; }; - /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ - unit_amount?: number; - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string; }; }; responses: { @@ -31887,7 +32418,7 @@ export interface operations { }; }; }; - "GetPricesSearch": { + GetPricesSearch: { /** * @description

Search for prices you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -31907,7 +32438,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31936,7 +32469,7 @@ export interface operations { }; }; }; - "GetPricesPrice": { + GetPricesPrice: { /** @description

Retrieves the price with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -31948,7 +32481,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -31965,7 +32500,7 @@ export interface operations { }; }; }; - "PostPricesPrice": { + PostPricesPrice: { /** @description

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ parameters: { path: { @@ -31973,52 +32508,54 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean; - /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ - currency_options?: ({ - [key: string]: ({ - /** custom_unit_amount */ - custom_unit_amount?: { - enabled: boolean; - maximum?: number; - minimum?: number; - preset?: number; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tiers?: ({ - flat_amount?: number; - /** Format: decimal */ - flat_amount_decimal?: string; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - up_to: "inf" | number; - })[]; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }) | undefined; - }) | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description A brief description of the price, hidden from customers. */ - nickname?: string; - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean; + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: ({ + [key: string]: ({ + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: ({ + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + })[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }) | undefined; + }) | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description A brief description of the price, hidden from customers. */ + nickname?: string; + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean; + }; }; }; responses: { @@ -32036,7 +32573,7 @@ export interface operations { }; }; }; - "GetProducts": { + GetProducts: { /** @description

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

*/ parameters?: { /** @description Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ @@ -32066,7 +32603,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32095,94 +32634,96 @@ export interface operations { }; }; }; - "PostProducts": { + PostProducts: { /** @description

Creates a new product object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean; - /** - * price_data_without_product - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. - */ - default_price_data?: { - currency: string; - currency_options?: { - [key: string]: ({ - /** custom_unit_amount */ - custom_unit_amount?: { - enabled: boolean; - maximum?: number; - minimum?: number; - preset?: number; - }; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean; + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string; + currency_options?: { + [key: string]: ({ + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: ({ + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + })[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }) | undefined; + }; + /** recurring_adhoc */ + recurring?: { /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - tiers?: ({ - flat_amount?: number; - /** Format: decimal */ - flat_amount_decimal?: string; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - up_to: "inf" | number; - })[]; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }) | undefined; - }; - /** recurring_adhoc */ - recurring?: { + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string; - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The product's name, meant to be displayable to the customer. */ - name: string; - /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. - */ - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string; + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The product's name, meant to be displayable to the customer. */ + name: string; + /** + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. + */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + }; + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean; + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string; + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string; + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string; }; - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean; - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. - */ - statement_descriptor?: string; - /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ - tax_code?: string; - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string; - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string; }; }; responses: { @@ -32200,7 +32741,7 @@ export interface operations { }; }; }; - "GetProductsSearch": { + GetProductsSearch: { /** * @description

Search for products you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -32220,7 +32761,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32249,7 +32792,7 @@ export interface operations { }; }; }; - "GetProductsId": { + GetProductsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -32261,7 +32804,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32278,7 +32823,7 @@ export interface operations { }; }; }; - "PostProductsId": { + PostProductsId: { /** @description

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

*/ parameters: { path: { @@ -32286,45 +32831,47 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the product is available for purchase. */ - active?: boolean; - /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ - default_price?: string; - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: (string)[] | ""; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The product's name, meant to be displayable to the customer. */ - name?: string; - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; - } | ""; - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean; - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string; - /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ - tax_code?: string | ""; - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string; - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the product is available for purchase. */ + active?: boolean; + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string; + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: (string)[] | ""; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The product's name, meant to be displayable to the customer. */ + name?: string; + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + } | ""; + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean; + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | ""; + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string; + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string | ""; + }; }; }; responses: { @@ -32342,7 +32889,7 @@ export interface operations { }; }; }; - "DeleteProductsId": { + DeleteProductsId: { /** @description

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ parameters: { path: { @@ -32350,7 +32897,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32367,7 +32916,7 @@ export interface operations { }; }; }; - "GetPromotionCodes": { + GetPromotionCodes: { /** @description

Returns a list of your promotion codes.

*/ parameters?: { /** @description Filter promotion codes by whether they are active. */ @@ -32397,7 +32946,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32425,44 +32976,46 @@ export interface operations { }; }; }; - "PostPromotionCodes": { + PostPromotionCodes: { /** @description

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Whether the promotion code is currently active. */ - active?: boolean; - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string; - /** @description The coupon for this promotion code. */ - coupon: string; - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. - */ - expires_at?: number; - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. - */ - restrictions?: { - currency_options?: { - [key: string]: { - minimum_amount?: number; - } | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the promotion code is currently active. */ + active?: boolean; + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string; + /** @description The coupon for this promotion code. */ + coupon: string; + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + expires_at?: number; + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number; + } | undefined; + }; + first_time_transaction?: boolean; + minimum_amount?: number; + minimum_amount_currency?: string; }; - first_time_transaction?: boolean; - minimum_amount?: number; - minimum_amount_currency?: string; }; }; }; @@ -32481,7 +33034,7 @@ export interface operations { }; }; }; - "GetPromotionCodesPromotionCode": { + GetPromotionCodesPromotionCode: { /** @description

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -32493,7 +33046,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32510,7 +33065,7 @@ export interface operations { }; }; }; - "PostPromotionCodesPromotionCode": { + PostPromotionCodesPromotionCode: { /** @description

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ parameters: { path: { @@ -32518,24 +33073,26 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ - active?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. - */ - restrictions?: { - currency_options?: { - [key: string]: { - minimum_amount?: number; - } | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number; + } | undefined; + }; }; }; }; @@ -32555,7 +33112,7 @@ export interface operations { }; }; }; - "GetQuotes": { + GetQuotes: { /** @description

Returns a list of your quotes.

*/ parameters?: { /** @description The ID of the customer whose quotes will be retrieved. */ @@ -32576,7 +33133,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32604,108 +33163,110 @@ export interface operations { }; }; }; - "PostQuotes": { + PostQuotes: { /** @description

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | ""; - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | ""; - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: "charge_automatically" | "send_invoice"; - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string; - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: (string)[] | ""; - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string; - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - */ - expires_at?: number; - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string; - /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - */ - from_quote?: { - is_revision?: boolean; - quote: string; - }; - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string; - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number; - }; - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: ({ - price?: string; - /** price_data */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring?: { + content: { + "application/x-www-form-urlencoded": { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | ""; + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | ""; + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: "charge_automatically" | "send_invoice"; + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string; + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: (string)[] | ""; + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string; + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + */ + expires_at?: number; + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string; + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean; + quote: string; + }; + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string; + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number; + }; + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ + price?: string; + /** price_data */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | ""; - /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - subscription_data?: { - description?: string; - effective_date?: "current_period_end" | number | ""; - trial_period_days?: number | ""; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | ""; + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string; + effective_date?: "current_period_end" | number | ""; + trial_period_days?: number | ""; + }; + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string; + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: { + amount?: number; + amount_percent?: number; + destination: string; + } | ""; }; - /** @description ID of the test clock to attach to the quote. */ - test_clock?: string; - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: { - amount?: number; - amount_percent?: number; - destination: string; - } | ""; }; }; responses: { @@ -32723,7 +33284,7 @@ export interface operations { }; }; }; - "GetQuotesQuote": { + GetQuotesQuote: { /** @description

Retrieves the quote with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -32735,7 +33296,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32752,7 +33315,7 @@ export interface operations { }; }; }; - "PostQuotesQuote": { + PostQuotesQuote: { /** @description

A quote models prices and services for a customer.

*/ parameters: { path: { @@ -32760,96 +33323,98 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | ""; - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | ""; - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: "charge_automatically" | "send_invoice"; - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string; - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: (string)[] | ""; - /** @description A description that will be displayed on the quote PDF. */ - description?: string; - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: ({ - coupon?: string; - discount?: string; - })[] | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number; - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string; - /** @description A header that will be displayed on the quote PDF. */ - header?: string; - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number; - }; - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: ({ - id?: string; - price?: string; - /** price_data */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring?: { + content: { + "application/x-www-form-urlencoded": { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | ""; + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | ""; + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: "charge_automatically" | "send_invoice"; + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string; + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: (string)[] | ""; + /** @description A description that will be displayed on the quote PDF. */ + description?: string; + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: ({ + coupon?: string; + discount?: string; + })[] | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number; + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string; + /** @description A header that will be displayed on the quote PDF. */ + header?: string; + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number; + }; + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ + id?: string; + price?: string; + /** price_data */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | ""; - /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - subscription_data?: { - description?: string; - effective_date?: "current_period_end" | number | ""; - trial_period_days?: number | ""; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | ""; + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string; + effective_date?: "current_period_end" | number | ""; + trial_period_days?: number | ""; + }; + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: { + amount?: number; + amount_percent?: number; + destination: string; + } | ""; }; - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: { - amount?: number; - amount_percent?: number; - destination: string; - } | ""; }; }; responses: { @@ -32867,7 +33432,7 @@ export interface operations { }; }; }; - "PostQuotesQuoteAccept": { + PostQuotesQuoteAccept: { /** @description

Accepts the specified quote.

*/ parameters: { path: { @@ -32875,9 +33440,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -32895,7 +33462,7 @@ export interface operations { }; }; }; - "PostQuotesQuoteCancel": { + PostQuotesQuoteCancel: { /** @description

Cancels the quote.

*/ parameters: { path: { @@ -32903,9 +33470,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -32923,7 +33492,7 @@ export interface operations { }; }; }; - "GetQuotesQuoteComputedUpfrontLineItems": { + GetQuotesQuoteComputedUpfrontLineItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -32941,7 +33510,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -32970,7 +33541,7 @@ export interface operations { }; }; }; - "PostQuotesQuoteFinalize": { + PostQuotesQuoteFinalize: { /** @description

Finalizes the quote.

*/ parameters: { path: { @@ -32978,14 +33549,16 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number; + }; }; }; responses: { @@ -33003,7 +33576,7 @@ export interface operations { }; }; }; - "GetQuotesQuoteLineItems": { + GetQuotesQuoteLineItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -33021,7 +33594,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33050,7 +33625,7 @@ export interface operations { }; }; }; - "GetQuotesQuotePdf": { + GetQuotesQuotePdf: { /** @description

Download the PDF for a finalized quote

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33062,7 +33637,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33079,7 +33656,7 @@ export interface operations { }; }; }; - "GetRadarEarlyFraudWarnings": { + GetRadarEarlyFraudWarnings: { /** @description

Returns a list of early fraud warnings.

*/ parameters?: { /** @description Only return early fraud warnings for the charge specified by this charge ID. */ @@ -33098,7 +33675,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33126,7 +33705,7 @@ export interface operations { }; }; }; - "GetRadarEarlyFraudWarningsEarlyFraudWarning": { + GetRadarEarlyFraudWarningsEarlyFraudWarning: { /** * @description

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

* @@ -33142,7 +33721,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33159,7 +33740,7 @@ export interface operations { }; }; }; - "GetRadarValueListItems": { + GetRadarValueListItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -33184,7 +33765,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33212,16 +33795,18 @@ export interface operations { }; }; }; - "PostRadarValueListItems": { + PostRadarValueListItems: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string; - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string; + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string; + }; }; }; responses: { @@ -33239,7 +33824,7 @@ export interface operations { }; }; }; - "GetRadarValueListItemsItem": { + GetRadarValueListItemsItem: { /** @description

Retrieves a ValueListItem object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33251,7 +33836,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33268,7 +33855,7 @@ export interface operations { }; }; }; - "DeleteRadarValueListItemsItem": { + DeleteRadarValueListItemsItem: { /** @description

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

*/ parameters: { path: { @@ -33276,7 +33863,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33293,7 +33882,7 @@ export interface operations { }; }; }; - "GetRadarValueLists": { + GetRadarValueLists: { /** @description

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

*/ parameters?: { /** @description The alias used to reference the value list when writing rules. */ @@ -33318,7 +33907,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33346,25 +33937,27 @@ export interface operations { }; }; }; - "PostRadarValueLists": { + PostRadarValueLists: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description The name of the value list for use in rules. */ - alias: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - * @enum {string} - */ - item_type?: "card_bin" | "card_fingerprint" | "case_sensitive_string" | "country" | "customer_id" | "email" | "ip_address" | "string"; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the value list for use in rules. */ + alias: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} + */ + item_type?: "card_bin" | "card_fingerprint" | "case_sensitive_string" | "country" | "customer_id" | "email" | "ip_address" | "string"; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The human-readable name of the value list. */ + name: string; }; - /** @description The human-readable name of the value list. */ - name: string; }; }; responses: { @@ -33382,7 +33975,7 @@ export interface operations { }; }; }; - "GetRadarValueListsValueList": { + GetRadarValueListsValueList: { /** @description

Retrieves a ValueList object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33394,7 +33987,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33411,7 +34006,7 @@ export interface operations { }; }; }; - "PostRadarValueListsValueList": { + PostRadarValueListsValueList: { /** @description

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

*/ parameters: { path: { @@ -33419,17 +34014,19 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The name of the value list for use in rules. */ - alias?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description The name of the value list for use in rules. */ + alias?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The human-readable name of the value list. */ + name?: string; }; - /** @description The human-readable name of the value list. */ - name?: string; }; }; responses: { @@ -33447,7 +34044,7 @@ export interface operations { }; }; }; - "DeleteRadarValueListsValueList": { + DeleteRadarValueListsValueList: { /** @description

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

*/ parameters: { path: { @@ -33455,7 +34052,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33472,7 +34071,7 @@ export interface operations { }; }; }; - "GetRefunds": { + GetRefunds: { /** @description

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

*/ parameters?: { /** @description Only return refunds for the charge specified by this charge ID. */ @@ -33497,7 +34096,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33525,35 +34126,37 @@ export interface operations { }; }; }; - "PostRefunds": { + PostRefunds: { /** @description

Create a refund.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description A positive integer representing how much to refund. */ - amount?: number; - charge?: string; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description Customer whose customer balance to refund from. */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Address to send refund email, use customer email if not specified */ - instructions_email?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * @description Origin of the refund - * @enum {string} - */ - origin?: "customer_balance"; - payment_intent?: string; - /** @enum {string} */ - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer representing how much to refund. */ + amount?: number; + charge?: string; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Customer whose customer balance to refund from. */ + customer?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: "customer_balance"; + payment_intent?: string; + /** @enum {string} */ + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; responses: { @@ -33571,7 +34174,7 @@ export interface operations { }; }; }; - "GetRefundsRefund": { + GetRefundsRefund: { /** @description

Retrieves the details of an existing refund.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33583,7 +34186,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33600,7 +34205,7 @@ export interface operations { }; }; }; - "PostRefundsRefund": { + PostRefundsRefund: { /** * @description

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

* @@ -33612,13 +34217,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -33636,7 +34243,7 @@ export interface operations { }; }; }; - "PostRefundsRefundCancel": { + PostRefundsRefundCancel: { /** * @description

Cancels a refund with a status of requires_action.

* @@ -33648,9 +34255,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -33668,7 +34277,7 @@ export interface operations { }; }; }; - "GetReportingReportRuns": { + GetReportingReportRuns: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -33689,7 +34298,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33717,32 +34328,34 @@ export interface operations { }; }; }; - "PostReportingReportRuns": { + PostReportingReportRuns: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - */ - parameters?: { - columns?: (string)[]; - connected_account?: string; - currency?: string; - /** Format: unix-time */ - interval_end?: number; - /** Format: unix-time */ - interval_start?: number; - payout?: string; - /** @enum {string} */ - reporting_category?: "advance" | "advance_funding" | "anticipation_repayment" | "charge" | "charge_failure" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" | "dispute" | "dispute_reversal" | "fee" | "financing_paydown" | "financing_paydown_reversal" | "financing_payout" | "financing_payout_reversal" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" | "network_cost" | "other_adjustment" | "partial_capture_reversal" | "payout" | "payout_reversal" | "platform_earning" | "platform_earning_refund" | "refund" | "refund_failure" | "risk_reserved_funds" | "tax" | "topup" | "topup_reversal" | "transfer" | "transfer_reversal"; - /** @enum {string} */ - timezone?: "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "Factory" | "GB" | "GB-Eire" | "GMT" | "GMT+0" | "GMT-0" | "GMT0" | "Greenwich" | "HST" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROC" | "ROK" | "Singapore" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Pacific-New" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu"; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: (string)[]; + connected_account?: string; + currency?: string; + /** Format: unix-time */ + interval_end?: number; + /** Format: unix-time */ + interval_start?: number; + payout?: string; + /** @enum {string} */ + reporting_category?: "advance" | "advance_funding" | "anticipation_repayment" | "charge" | "charge_failure" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" | "dispute" | "dispute_reversal" | "fee" | "financing_paydown" | "financing_paydown_reversal" | "financing_payout" | "financing_payout_reversal" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" | "network_cost" | "other_adjustment" | "partial_capture_reversal" | "payout" | "payout_reversal" | "platform_earning" | "platform_earning_refund" | "refund" | "refund_failure" | "risk_reserved_funds" | "tax" | "topup" | "topup_reversal" | "transfer" | "transfer_reversal"; + /** @enum {string} */ + timezone?: "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "Factory" | "GB" | "GB-Eire" | "GMT" | "GMT+0" | "GMT-0" | "GMT0" | "Greenwich" | "HST" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROC" | "ROK" | "Singapore" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Pacific-New" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu"; + }; + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string; }; - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string; }; }; responses: { @@ -33760,7 +34373,7 @@ export interface operations { }; }; }; - "GetReportingReportRunsReportRun": { + GetReportingReportRunsReportRun: { /** @description

Retrieves the details of an existing Report Run.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33772,7 +34385,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33789,7 +34404,7 @@ export interface operations { }; }; }; - "GetReportingReportTypes": { + GetReportingReportTypes: { /** @description

Returns a full list of Report Types.

*/ parameters?: { /** @description Specifies which fields in the response should be expanded. */ @@ -33798,7 +34413,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33826,7 +34443,7 @@ export interface operations { }; }; }; - "GetReportingReportTypesReportType": { + GetReportingReportTypesReportType: { /** @description

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33838,7 +34455,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33855,7 +34474,7 @@ export interface operations { }; }; }; - "GetReviews": { + GetReviews: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -33876,7 +34495,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33904,7 +34525,7 @@ export interface operations { }; }; }; - "GetReviewsReview": { + GetReviewsReview: { /** @description

Retrieves a Review object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -33916,7 +34537,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -33933,7 +34556,7 @@ export interface operations { }; }; }; - "PostReviewsReviewApprove": { + PostReviewsReviewApprove: { /** @description

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

*/ parameters: { path: { @@ -33941,9 +34564,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -33961,7 +34586,7 @@ export interface operations { }; }; }; - "GetSetupAttempts": { + GetSetupAttempts: { /** @description

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ parameters: { /** @@ -33992,7 +34617,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -34020,7 +34647,7 @@ export interface operations { }; }; }; - "GetSetupIntents": { + GetSetupIntents: { /** @description

Returns a list of SetupIntents.

*/ parameters?: { /** @@ -34052,7 +34679,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -34074,294 +34703,296 @@ export interface operations { }; /** @description Error response. */ default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; - }; - }; - "PostSetupIntents": { - /** - * @description

Creates a SetupIntent object.

- * - *

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

- */ - requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - * - * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - */ - attach_to_self?: boolean; - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean; - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Indicates the directions of money movement for which this payment method is intended to be used. - * - * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - */ - flow_directions?: ("inbound" | "outbound")[]; - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: Record; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; - }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string; - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** - * payment_method_data_params - * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - * value in the SetupIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; - }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + }; + PostSetupIntents: { + /** + * @description

Creates a SetupIntent object.

+ * + *

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

+ */ + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean; + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[]; + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: Record; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; }; }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string | undefined; }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: "cad" | "usd"; - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - default_for?: ("invoice" | "subscription")[]; - interval_description?: string; + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string; + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - transaction_type?: "business" | "personal"; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }; - /** setup_intent_payment_method_options_param */ - blik?: { - code?: string; - }; - /** setup_intent_param */ - card?: { - /** setup_intent_mandate_options_param */ - mandate_options?: { - amount: number; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { /** @enum {string} */ - amount_type: "fixed" | "maximum"; - currency: string; - description?: string; - /** Format: unix-time */ - end_date?: number; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; - /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }; - /** setup_intent_payment_method_options_param */ - link?: { - persistent_token?: string; - }; - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; }; - /** setup_intent_payment_method_options_param */ - us_bank_account?: { - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: "cad" | "usd"; + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + default_for?: ("invoice" | "subscription")[]; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + }; + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: (string)[]; + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string; + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number; + currency: string; + }; + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: "off_session" | "on_session"; }; - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: (string)[]; - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string; - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number; - currency: string; - }; - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: "off_session" | "on_session"; }; }; responses: { @@ -34379,7 +35010,7 @@ export interface operations { }; }; }; - "GetSetupIntentsIntent": { + GetSetupIntentsIntent: { /** * @description

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

* @@ -34399,7 +35030,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -34416,7 +35049,7 @@ export interface operations { }; }; }; - "PostSetupIntentsIntent": { + PostSetupIntentsIntent: { /** @description

Updates a SetupIntent object.

*/ parameters: { path: { @@ -34424,241 +35057,243 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - * - * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - */ - attach_to_self?: boolean; - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Indicates the directions of money movement for which this payment method is intended to be used. - * - * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - */ - flow_directions?: ("inbound" | "outbound")[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** - * payment_method_data_params - * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - * value in the SetupIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; - }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; - }; - }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; - metadata?: { + content: { + "application/x-www-form-urlencoded": { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string | undefined; - }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: "cad" | "usd"; - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - default_for?: ("invoice" | "subscription")[]; - interval_description?: string; + }) | ""; + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - transaction_type?: "business" | "personal"; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }; - /** setup_intent_payment_method_options_param */ - blik?: { - code?: string; - }; - /** setup_intent_param */ - card?: { - /** setup_intent_mandate_options_param */ - mandate_options?: { - amount: number; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { /** @enum {string} */ - amount_type: "fixed" | "maximum"; - currency: string; - description?: string; - /** Format: unix-time */ - end_date?: number; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; - /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }; - /** setup_intent_payment_method_options_param */ - link?: { - persistent_token?: string; - }; - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; }; - /** setup_intent_payment_method_options_param */ - us_bank_account?: { - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: "cad" | "usd"; + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + default_for?: ("invoice" | "subscription")[]; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + }; + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: (string)[]; }; - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: (string)[]; }; }; responses: { @@ -34676,7 +35311,7 @@ export interface operations { }; }; }; - "PostSetupIntentsIntentCancel": { + PostSetupIntentsIntentCancel: { /** * @description

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

* @@ -34688,14 +35323,16 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -34713,7 +35350,7 @@ export interface operations { }; }; }; - "PostSetupIntentsIntentConfirm": { + PostSetupIntentsIntentConfirm: { /** * @description

Confirm that your customer intends to set up the current or * provided payment method. For example, you would confirm a SetupIntent @@ -34735,251 +35372,253 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The client secret of the SetupIntent. */ - client_secret?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description This hash contains details about the Mandate to create */ - mandate_data?: ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: Record; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; + content: { + "application/x-www-form-urlencoded": { + /** @description The client secret of the SetupIntent. */ + client_secret?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description This hash contains details about the Mandate to create */ + mandate_data?: ({ + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: Record; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }) | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string; - user_agent?: string; + }) | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string; + user_agent?: string; + }; + /** @enum {string} */ + type: "online"; }; - /** @enum {string} */ - type: "online"; - }; - }; - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** - * payment_method_data_params - * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - * value in the SetupIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string; - institution_number: string; - transit_number: string; - }; - /** param */ - affirm?: Record; - /** param */ - afterpay_clearpay?: Record; - /** param */ - alipay?: Record; - /** param */ - au_becs_debit?: { - account_number: string; - bsb_number: string; - }; - /** param */ - bacs_debit?: { - account_number?: string; - sort_code?: string; - }; - /** param */ - bancontact?: Record; - /** billing_details_inner_params */ - billing_details?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - } | ""; - email?: string | ""; - name?: string; - phone?: string; - }; - /** param */ - blik?: Record; - /** param */ - boleto?: { - tax_id: string; - }; - /** param */ - customer_balance?: Record; - /** param */ - eps?: { - /** @enum {string} */ - bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; - }; - /** param */ - fpx?: { - /** @enum {string} */ - bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; - }; - /** param */ - giropay?: Record; - /** param */ - grabpay?: Record; - /** param */ - ideal?: { - /** @enum {string} */ - bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; }; - /** param */ - interac_present?: Record; - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number; - month: number; - year: number; + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; }; - }; - /** param */ - konbini?: Record; - /** param */ - link?: Record; - metadata?: { - [key: string]: string | undefined; - }; - /** param */ - oxxo?: Record; - /** param */ - p24?: { - /** @enum {string} */ - bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; - }; - /** param */ - paynow?: Record; - /** param */ - pix?: Record; - /** param */ - promptpay?: Record; - /** radar_options */ - radar_options?: { - session?: string; - }; - /** param */ - sepa_debit?: { - iban: string; - }; - /** param */ - sofort?: { - /** @enum {string} */ - country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; - }; - /** @enum {string} */ - type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; - /** payment_method_param */ - us_bank_account?: { - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number?: string; - /** @enum {string} */ - account_type?: "checking" | "savings"; - financial_connections_account?: string; - routing_number?: string; - }; - /** param */ - wechat_pay?: Record; - }; - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: "cad" | "usd"; - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | ""; - default_for?: ("invoice" | "subscription")[]; - interval_description?: string; + /** param */ + affirm?: Record; + /** param */ + afterpay_clearpay?: Record; + /** param */ + alipay?: Record; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: Record; + /** billing_details_inner_params */ + billing_details?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: Record; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: Record; + /** param */ + eps?: { /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; + bank?: "arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau"; + }; + /** param */ + fpx?: { /** @enum {string} */ - transaction_type?: "business" | "personal"; + bank: "affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }; - /** setup_intent_payment_method_options_param */ - blik?: { - code?: string; - }; - /** setup_intent_param */ - card?: { - /** setup_intent_mandate_options_param */ - mandate_options?: { - amount: number; + /** param */ + giropay?: Record; + /** param */ + grabpay?: Record; + /** param */ + ideal?: { /** @enum {string} */ - amount_type: "fixed" | "maximum"; - currency: string; - description?: string; - /** Format: unix-time */ - end_date?: number; + bank?: "abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot"; + }; + /** param */ + interac_present?: Record; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: Record; + /** param */ + link?: Record; + metadata?: { + [key: string]: string | undefined; + }; + /** param */ + oxxo?: Record; + /** param */ + p24?: { /** @enum {string} */ - interval: "day" | "month" | "sporadic" | "week" | "year"; - interval_count?: number; - reference: string; - /** Format: unix-time */ - start_date: number; - supported_types?: ("india")[]; + bank?: "alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank"; + }; + /** param */ + paynow?: Record; + /** param */ + pix?: Record; + /** param */ + promptpay?: Record; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; }; /** @enum {string} */ - network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }; - /** setup_intent_payment_method_options_param */ - link?: { - persistent_token?: string; - }; - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: Record; + type: "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: Record; }; - /** setup_intent_payment_method_options_param */ - us_bank_account?: { - /** linked_account_options_param */ - financial_connections?: { - permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; - return_url?: string; + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: "cad" | "usd"; + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + default_for?: ("invoice" | "subscription")[]; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** networks_options_param */ - networks?: { - requested?: ("ach" | "us_domestic_wire")[]; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: ("india")[]; + }; + /** @enum {string} */ + network?: "amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + }; + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: Record; + }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string; }; - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string; }; }; responses: { @@ -34997,7 +35636,7 @@ export interface operations { }; }; }; - "PostSetupIntentsIntentVerifyMicrodeposits": { + PostSetupIntentsIntentVerifyMicrodeposits: { /** @description

Verifies microdeposits on a SetupIntent object.

*/ parameters: { path: { @@ -35005,15 +35644,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: (number)[]; - /** @description The client secret of the SetupIntent. */ - client_secret?: string; - /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ - descriptor_code?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: (number)[]; + /** @description The client secret of the SetupIntent. */ + client_secret?: string; + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -35031,7 +35672,7 @@ export interface operations { }; }; }; - "GetShippingRates": { + GetShippingRates: { /** @description

Returns a list of your shipping rates.

*/ parameters?: { /** @description Only return shipping rates that are active or inactive. */ @@ -35057,7 +35698,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35085,63 +35728,65 @@ export interface operations { }; }; }; - "PostShippingRates": { + PostShippingRates: { /** @description

Creates a new shipping rate object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + content: { + "application/x-www-form-urlencoded": { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; }; - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: "business_day" | "day" | "hour" | "month" | "week"; - value: number; + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: ({ + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }) | undefined; + }; }; - }; - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number; - currency: string; - currency_options?: { - [key: string]: ({ - amount: number; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - }) | undefined; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; }; + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string; + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: "fixed_amount"; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string; - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: "fixed_amount"; }; }; responses: { @@ -35159,7 +35804,7 @@ export interface operations { }; }; }; - "GetShippingRatesShippingRateToken": { + GetShippingRatesShippingRateToken: { /** @description

Returns the shipping rate object with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -35171,7 +35816,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35188,7 +35835,7 @@ export interface operations { }; }; }; - "PostShippingRatesShippingRateToken": { + PostShippingRatesShippingRateToken: { /** @description

Updates an existing shipping rate object.

*/ parameters: { path: { @@ -35196,33 +35843,35 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * fixed_amount_update - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - currency_options?: { - [key: string]: ({ - amount?: number; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - }) | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: ({ + amount?: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }) | undefined; + }; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; }; }; responses: { @@ -35240,7 +35889,7 @@ export interface operations { }; }; }; - "GetSigmaScheduledQueryRuns": { + GetSigmaScheduledQueryRuns: { /** @description

Returns a list of scheduled query runs.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -35255,7 +35904,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35283,7 +35934,7 @@ export interface operations { }; }; }; - "GetSigmaScheduledQueryRunsScheduledQueryRun": { + GetSigmaScheduledQueryRunsScheduledQueryRun: { /** @description

Retrieves the details of an scheduled query run.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -35295,7 +35946,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35312,7 +35965,7 @@ export interface operations { }; }; }; - "GetSkus": { + GetSkus: { /** @description

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

*/ parameters?: { /** @description Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ @@ -35339,7 +35992,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35367,53 +36022,55 @@ export interface operations { }; }; }; - "PostSkus": { + PostSkus: { /** @description

Creates a new SKU associated with a product.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean; - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { - [key: string]: string | undefined; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string; - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string; - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number; - /** @enum {string} */ - type: "bucket" | "finite" | "infinite"; - /** @enum {string} */ - value?: "" | "in_stock" | "limited" | "out_of_stock"; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. - */ - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean; + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { + [key: string]: string | undefined; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string; + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number; + /** @enum {string} */ + type: "bucket" | "finite" | "infinite"; + /** @enum {string} */ + value?: "" | "in_stock" | "limited" | "out_of_stock"; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + }; + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number; + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string; }; - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number; - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string; }; }; responses: { @@ -35431,7 +36088,7 @@ export interface operations { }; }; }; - "GetSkusId": { + GetSkusId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -35443,7 +36100,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35460,7 +36119,7 @@ export interface operations { }; }; }; - "PostSkusId": { + PostSkusId: { /** * @description

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

* @@ -35472,45 +36131,47 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Whether this SKU is available for purchase. */ - active?: boolean; - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { - [key: string]: string | undefined; - }; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string; - /** - * inventory_update_specs - * @description Description of the SKU's inventory. - */ - inventory?: { - quantity?: number; - /** @enum {string} */ - type?: "bucket" | "finite" | "infinite"; - /** @enum {string} */ - value?: "" | "in_stock" | "limited" | "out_of_stock"; + content: { + "application/x-www-form-urlencoded": { + /** @description Whether this SKU is available for purchase. */ + active?: boolean; + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { + [key: string]: string | undefined; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number; + /** @enum {string} */ + type?: "bucket" | "finite" | "infinite"; + /** @enum {string} */ + value?: "" | "in_stock" | "limited" | "out_of_stock"; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + } | ""; + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number; + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; - } | ""; - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number; - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string; }; }; responses: { @@ -35528,7 +36189,7 @@ export interface operations { }; }; }; - "DeleteSkusId": { + DeleteSkusId: { /** @description

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

*/ parameters: { path: { @@ -35536,7 +36197,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35553,134 +36216,136 @@ export interface operations { }; }; }; - "PostSources": { + PostSources: { /** @description

Creates a new source object.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number; - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string; - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: "code_verification" | "none" | "receiver" | "redirect"; - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string; - }; - /** mandate_online_acceptance_params */ - online?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number; + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string; + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: "code_verification" | "none" | "receiver" | "redirect"; + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { /** Format: unix-time */ date?: number; ip?: string; + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string; + }; + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + /** @enum {string} */ + status: "accepted" | "pending" | "refused" | "revoked"; + /** @enum {string} */ + type?: "offline" | "online"; user_agent?: string; }; + amount?: number | ""; + currency?: string; /** @enum {string} */ - status: "accepted" | "pending" | "refused" | "revoked"; + interval?: "one_time" | "scheduled" | "variable"; /** @enum {string} */ - type?: "offline" | "online"; - user_agent?: string; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; }; - amount?: number | ""; - currency?: string; - /** @enum {string} */ - interval?: "one_time" | "scheduled" | "variable"; - /** @enum {string} */ - notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - }; - metadata?: { - [key: string]: string | undefined; - }; - /** @description The source to share. */ - original_source?: string; - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + metadata?: { + [key: string]: string | undefined; }; - email?: string; - name?: string; - phone?: string; - }; - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: "email" | "manual" | "none"; - }; - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string; - }; - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: ({ - amount?: number; - currency?: string; - description?: string; - parent?: string; - quantity?: number; - /** @enum {string} */ - type?: "discount" | "shipping" | "sku" | "tax"; - })[]; - /** order_shipping */ - shipping?: { - /** address */ - address: { + /** @description The source to share. */ + original_source?: string; + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { city?: string; country?: string; - line1: string; + line1?: string; line2?: string; postal_code?: string; state?: string; }; - carrier?: string; + email?: string; name?: string; phone?: string; - tracking_number?: string; }; + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: "email" | "manual" | "none"; + }; + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string; + }; + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: ({ + amount?: number; + currency?: string; + description?: string; + parent?: string; + quantity?: number; + /** @enum {string} */ + type?: "discount" | "shipping" | "sku" | "tax"; + })[]; + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + }; + }; + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string; + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string; + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string; + /** @enum {string} */ + usage?: "reusable" | "single_use"; }; - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string; - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string; - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string; - /** @enum {string} */ - usage?: "reusable" | "single_use"; }; }; responses: { @@ -35698,7 +36363,7 @@ export interface operations { }; }; }; - "GetSourcesSource": { + GetSourcesSource: { /** @description

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

*/ parameters: { /** @description The client secret of the source. Required if a publishable key is used to retrieve the source. */ @@ -35712,7 +36377,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35729,7 +36396,7 @@ export interface operations { }; }; }; - "PostSourcesSource": { + PostSourcesSource: { /** * @description

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

* @@ -35741,96 +36408,98 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Amount associated with the source. */ - amount?: number; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number; - ip?: string; - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string; - }; - /** mandate_online_acceptance_params */ - online?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount associated with the source. */ + amount?: number; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { /** Format: unix-time */ date?: number; ip?: string; + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string; + }; + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + /** @enum {string} */ + status: "accepted" | "pending" | "refused" | "revoked"; + /** @enum {string} */ + type?: "offline" | "online"; user_agent?: string; }; + amount?: number | ""; + currency?: string; /** @enum {string} */ - status: "accepted" | "pending" | "refused" | "revoked"; + interval?: "one_time" | "scheduled" | "variable"; /** @enum {string} */ - type?: "offline" | "online"; - user_agent?: string; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; }; - amount?: number | ""; - currency?: string; - /** @enum {string} */ - interval?: "one_time" | "scheduled" | "variable"; - /** @enum {string} */ - notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; - name?: string; - phone?: string; - }; - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: ({ - amount?: number; - currency?: string; - description?: string; - parent?: string; - quantity?: number; - /** @enum {string} */ - type?: "discount" | "shipping" | "sku" | "tax"; - })[]; - /** order_shipping */ - shipping?: { - /** address */ - address: { + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { city?: string; country?: string; - line1: string; + line1?: string; line2?: string; postal_code?: string; state?: string; }; - carrier?: string; + email?: string; name?: string; phone?: string; - tracking_number?: string; + }; + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: ({ + amount?: number; + currency?: string; + description?: string; + parent?: string; + quantity?: number; + /** @enum {string} */ + type?: "discount" | "shipping" | "sku" | "tax"; + })[]; + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + }; }; }; }; @@ -35850,7 +36519,7 @@ export interface operations { }; }; }; - "GetSourcesSourceMandateNotificationsMandateNotification": { + GetSourcesSourceMandateNotificationsMandateNotification: { /** @description

Retrieves a new Source MandateNotification.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -35863,7 +36532,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35880,7 +36551,7 @@ export interface operations { }; }; }; - "GetSourcesSourceSourceTransactions": { + GetSourcesSourceSourceTransactions: { /** @description

List source transactions for a given source.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -35898,7 +36569,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35926,7 +36599,7 @@ export interface operations { }; }; }; - "GetSourcesSourceSourceTransactionsSourceTransaction": { + GetSourcesSourceSourceTransactionsSourceTransaction: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -35939,7 +36612,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -35956,7 +36631,7 @@ export interface operations { }; }; }; - "PostSourcesSourceVerify": { + PostSourcesSourceVerify: { /** @description

Verify a given source.

*/ parameters: { path: { @@ -35964,11 +36639,13 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The values needed to verify the source. */ - values: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The values needed to verify the source. */ + values: (string)[]; + }; }; }; responses: { @@ -35986,7 +36663,7 @@ export interface operations { }; }; }; - "GetSubscriptionItems": { + GetSubscriptionItems: { /** @description

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -36003,7 +36680,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36031,68 +36710,70 @@ export interface operations { }; }; }; - "PostSubscriptionItems": { + PostSubscriptionItems: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: { - usage_gte: number; - } | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: "allow_incomplete" | "default_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; - /** @description The ID of the price object. */ - price?: string; - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring: { + content: { + "application/x-www-form-urlencoded": { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: { + usage_gte: number; + } | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: "allow_incomplete" | "default_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** @description The ID of the price object. */ + price?: string; + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number; + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** @description The identifier of the subscription to modify. */ + subscription: string; + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: (string)[] | ""; }; - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. - * @enum {string} - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number; - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number; - /** @description The identifier of the subscription to modify. */ - subscription: string; - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: (string)[] | ""; }; }; responses: { @@ -36110,7 +36791,7 @@ export interface operations { }; }; }; - "GetSubscriptionItemsItem": { + GetSubscriptionItemsItem: { /** @description

Retrieves the subscription item with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -36122,7 +36803,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36139,7 +36822,7 @@ export interface operations { }; }; }; - "PostSubscriptionItemsItem": { + PostSubscriptionItemsItem: { /** @description

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

*/ parameters: { path: { @@ -36147,65 +36830,67 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: { - usage_gte: number; - } | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: "allow_incomplete" | "default_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string; - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring: { + content: { + "application/x-www-form-urlencoded": { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: { + usage_gte: number; + } | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: "allow_incomplete" | "default_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string; + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number; + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: (string)[] | ""; }; - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. - * @enum {string} - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number; - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number; - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: (string)[] | ""; }; }; responses: { @@ -36223,7 +36908,7 @@ export interface operations { }; }; }; - "DeleteSubscriptionItemsItem": { + DeleteSubscriptionItemsItem: { /** @description

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

*/ parameters: { path: { @@ -36231,19 +36916,21 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean; - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. - * @enum {string} - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean; + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number; + }; }; }; responses: { @@ -36261,7 +36948,7 @@ export interface operations { }; }; }; - "GetSubscriptionItemsSubscriptionItemUsageRecordSummaries": { + GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { /** * @description

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

* @@ -36283,7 +36970,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36311,7 +37000,7 @@ export interface operations { }; }; }; - "PostSubscriptionItemsSubscriptionItemUsageRecords": { + PostSubscriptionItemsSubscriptionItemUsageRecords: { /** * @description

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

* @@ -36327,18 +37016,20 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: "increment" | "set"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The usage quantity for the specified timestamp. */ - quantity: number; - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: "now" | number; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: "increment" | "set"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The usage quantity for the specified timestamp. */ + quantity: number; + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: "now" | number; + }; }; }; responses: { @@ -36356,7 +37047,7 @@ export interface operations { }; }; }; - "GetSubscriptionSchedules": { + GetSubscriptionSchedules: { /** @description

Retrieves the list of your subscription schedules.

*/ parameters?: { /** @description Only return subscription schedules that were created canceled the given date interval. */ @@ -36403,7 +37094,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36431,72 +37124,18 @@ export interface operations { }; }; }; - "PostSubscriptionSchedules": { + PostSubscriptionSchedules: { /** @description

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

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string; - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - application_fee_percent?: number; - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean; - }; - /** @enum {string} */ - billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } | ""; - /** @enum {string} */ - collection_method?: "charge_automatically" | "send_invoice"; - default_payment_method?: string; - description?: string; - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number; - }; - on_behalf_of?: string | ""; - transfer_data?: { - amount_percent?: number; - destination: string; - } | ""; - }; - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: "cancel" | "none" | "release" | "renew"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: ({ - add_invoice_items?: ({ - price?: string; - /** one_time_price_data */ - price_data?: { - currency: string; - product: string; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; + content: { + "application/x-www-form-urlencoded": { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string; + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { application_fee_percent?: number; /** automatic_tax_config */ automatic_tax?: { @@ -36510,59 +37149,115 @@ export interface operations { } | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; - coupon?: string; - currency?: string; default_payment_method?: string; - default_tax_rates?: (string)[] | ""; description?: string; - /** Format: unix-time */ - end_date?: number; /** subscription_schedules_param */ invoice_settings?: { days_until_due?: number; }; - items: ({ - billing_thresholds?: { - usage_gte: number; - } | ""; - price?: string; - /** recurring_price_data */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - iterations?: number; - metadata?: { - [key: string]: string | undefined; - }; - on_behalf_of?: string; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** transfer_data_specs */ + on_behalf_of?: string | ""; transfer_data?: { amount_percent?: number; destination: string; - }; - trial?: boolean; - /** Format: unix-time */ - trial_end?: number; - })[]; - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: number | "now"; + } | ""; + }; + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: ({ + add_invoice_items?: ({ + price?: string; + /** one_time_price_data */ + price_data?: { + currency: string; + product: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + application_fee_percent?: number; + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean; + }; + /** @enum {string} */ + billing_cycle_anchor?: "automatic" | "phase_start"; + billing_thresholds?: { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } | ""; + /** @enum {string} */ + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + currency?: string; + default_payment_method?: string; + default_tax_rates?: (string)[] | ""; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number; + }; + items: ({ + billing_thresholds?: { + usage_gte: number; + } | ""; + price?: string; + /** recurring_price_data */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + iterations?: number; + metadata?: { + [key: string]: string | undefined; + }; + on_behalf_of?: string; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number; + destination: string; + }; + trial?: boolean; + /** Format: unix-time */ + trial_end?: number; + })[]; + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: number | "now"; + }; }; }; responses: { @@ -36580,7 +37275,7 @@ export interface operations { }; }; }; - "GetSubscriptionSchedulesSchedule": { + GetSubscriptionSchedulesSchedule: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -36592,7 +37287,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36609,7 +37306,7 @@ export interface operations { }; }; }; - "PostSubscriptionSchedulesSchedule": { + PostSubscriptionSchedulesSchedule: { /** @description

Updates an existing subscription schedule.

*/ parameters: { path: { @@ -36617,65 +37314,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - application_fee_percent?: number; - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean; - }; - /** @enum {string} */ - billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } | ""; - /** @enum {string} */ - collection_method?: "charge_automatically" | "send_invoice"; - default_payment_method?: string; - description?: string; - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number; - }; - on_behalf_of?: string | ""; - transfer_data?: { - amount_percent?: number; - destination: string; - } | ""; - }; - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: "cancel" | "none" | "release" | "renew"; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: ({ - add_invoice_items?: ({ - price?: string; - /** one_time_price_data */ - price_data?: { - currency: string; - product: string; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; + content: { + "application/x-www-form-urlencoded": { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { application_fee_percent?: number; /** automatic_tax_config */ automatic_tax?: { @@ -36689,60 +37334,114 @@ export interface operations { } | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; - coupon?: string; default_payment_method?: string; - default_tax_rates?: (string)[] | ""; description?: string; - end_date?: number | "now"; /** subscription_schedules_param */ invoice_settings?: { days_until_due?: number; }; - items: ({ - billing_thresholds?: { - usage_gte: number; - } | ""; - price?: string; - /** recurring_price_data */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: (string)[] | ""; - })[]; - iterations?: number; - metadata?: { - [key: string]: string | undefined; - }; - on_behalf_of?: string; - /** @enum {string} */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - start_date?: number | "now"; - /** transfer_data_specs */ + on_behalf_of?: string | ""; transfer_data?: { amount_percent?: number; destination: string; - }; - trial?: boolean; - trial_end?: number | "now"; - })[]; - /** - * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. - * @enum {string} - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; + } | ""; + }; + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: ({ + add_invoice_items?: ({ + price?: string; + /** one_time_price_data */ + price_data?: { + currency: string; + product: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + application_fee_percent?: number; + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean; + }; + /** @enum {string} */ + billing_cycle_anchor?: "automatic" | "phase_start"; + billing_thresholds?: { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } | ""; + /** @enum {string} */ + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + default_payment_method?: string; + default_tax_rates?: (string)[] | ""; + description?: string; + end_date?: number | "now"; + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number; + }; + items: ({ + billing_thresholds?: { + usage_gte: number; + } | ""; + price?: string; + /** recurring_price_data */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: (string)[] | ""; + })[]; + iterations?: number; + metadata?: { + [key: string]: string | undefined; + }; + on_behalf_of?: string; + /** @enum {string} */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + start_date?: number | "now"; + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number; + destination: string; + }; + trial?: boolean; + trial_end?: number | "now"; + })[]; + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; }; }; responses: { @@ -36760,7 +37459,7 @@ export interface operations { }; }; }; - "PostSubscriptionSchedulesScheduleCancel": { + PostSubscriptionSchedulesScheduleCancel: { /** @description

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

*/ parameters: { path: { @@ -36768,13 +37467,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean; - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean; + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean; + }; }; }; responses: { @@ -36792,7 +37493,7 @@ export interface operations { }; }; }; - "PostSubscriptionSchedulesScheduleRelease": { + PostSubscriptionSchedulesScheduleRelease: { /** @description

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

*/ parameters: { path: { @@ -36800,11 +37501,13 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean; + }; }; }; responses: { @@ -36822,7 +37525,7 @@ export interface operations { }; }; }; - "GetSubscriptions": { + GetSubscriptions: { /** @description

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

*/ parameters?: { /** @description The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ @@ -36865,7 +37568,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -36893,7 +37598,7 @@ export interface operations { }; }; }; - "PostSubscriptions": { + PostSubscriptions: { /** * @description

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

* @@ -36904,213 +37609,215 @@ export interface operations { * Schedules provide the flexibility to model more complex billing configurations that change over time.

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

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating @@ -37148,7 +37855,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37177,7 +37886,7 @@ export interface operations { }; }; }; - "GetSubscriptionsSubscriptionExposedId": { + GetSubscriptionsSubscriptionExposedId: { /** @description

Retrieves the subscription with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -37189,7 +37898,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37206,7 +37917,7 @@ export interface operations { }; }; }; - "PostSubscriptionsSubscriptionExposedId": { + PostSubscriptionsSubscriptionExposedId: { /** @description

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

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

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

* @@ -37446,13 +38159,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean; - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean; + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean; + }; }; }; responses: { @@ -37470,7 +38185,7 @@ export interface operations { }; }; }; - "DeleteSubscriptionsSubscriptionExposedIdDiscount": { + DeleteSubscriptionsSubscriptionExposedIdDiscount: { /** @description

Removes the currently applied discount on a subscription.

*/ parameters: { path: { @@ -37478,7 +38193,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37495,7 +38212,7 @@ export interface operations { }; }; }; - "GetTaxCodes": { + GetTaxCodes: { /** @description

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

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -37510,7 +38227,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37538,7 +38257,7 @@ export interface operations { }; }; }; - "GetTaxCodesId": { + GetTaxCodesId: { /** @description

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -37550,7 +38269,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37567,7 +38288,7 @@ export interface operations { }; }; }; - "GetTaxRates": { + GetTaxRates: { /** @description

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

*/ parameters?: { /** @description Optional flag to filter by tax rates that are either active or inactive (archived). */ @@ -37593,7 +38314,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37621,37 +38344,39 @@ export interface operations { }; }; }; - "PostTaxRates": { + PostTaxRates: { /** @description

Creates a new tax rate.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean; - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string; - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string; - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean; - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean; + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string; + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean; + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description This represents the tax rate percent out of 100. */ + percentage: number; + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string; + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat"; }; - /** @description This represents the tax rate percent out of 100. */ - percentage: number; - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string; - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat"; }; }; responses: { @@ -37669,7 +38394,7 @@ export interface operations { }; }; }; - "GetTaxRatesTaxRate": { + GetTaxRatesTaxRate: { /** @description

Retrieves a tax rate with the given ID

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -37681,7 +38406,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37698,7 +38425,7 @@ export interface operations { }; }; }; - "PostTaxRatesTaxRate": { + PostTaxRatesTaxRate: { /** @description

Updates an existing tax rate.

*/ parameters: { path: { @@ -37706,30 +38433,32 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean; - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string; - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string; - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string; - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat"; + content: { + "application/x-www-form-urlencoded": { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean; + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string; + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string; + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: "gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat"; + }; }; }; responses: { @@ -37747,7 +38476,7 @@ export interface operations { }; }; }; - "GetTerminalConfigurations": { + GetTerminalConfigurations: { /** @description

Returns a list of Configuration objects.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -37764,7 +38493,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37792,112 +38523,114 @@ export interface operations { }; }; }; - "PostTerminalConfigurations": { + PostTerminalConfigurations: { /** @description

Creates a new Configuration object.

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** - * bbpos_wise_pose - * @description An object containing device type specific settings for BBPOS WisePOS E readers - */ - bbpos_wisepos_e?: { - splashscreen?: string | ""; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Tipping configurations for readers supporting on-reader tips */ - tipping?: { - /** currency_specific_config */ - aud?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - cad?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - chf?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - czk?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - dkk?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - eur?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - gbp?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - hkd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - myr?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - nok?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - nzd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - sek?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - sgd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - usd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - } | ""; - /** - * verifone_p400 - * @description An object containing device type specific settings for Verifone P400 readers - */ - verifone_p400?: { - splashscreen?: string | ""; + content: { + "application/x-www-form-urlencoded": { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: { + splashscreen?: string | ""; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: { + /** currency_specific_config */ + aud?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + cad?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + chf?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + czk?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + dkk?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + eur?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + gbp?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + hkd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + myr?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nok?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nzd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sek?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sgd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + usd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + } | ""; + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: string | ""; + }; }; }; }; @@ -37916,7 +38649,7 @@ export interface operations { }; }; }; - "GetTerminalConfigurationsConfiguration": { + GetTerminalConfigurationsConfiguration: { /** @description

Retrieves a Configuration object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -37928,7 +38661,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -37945,7 +38680,7 @@ export interface operations { }; }; }; - "PostTerminalConfigurationsConfiguration": { + PostTerminalConfigurationsConfiguration: { /** @description

Updates a new Configuration object.

*/ parameters: { path: { @@ -37953,104 +38688,106 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ - bbpos_wisepos_e?: ({ - splashscreen?: string | ""; - }) | ""; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Tipping configurations for readers supporting on-reader tips */ - tipping?: { - /** currency_specific_config */ - aud?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - cad?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - chf?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - czk?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - dkk?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - eur?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - gbp?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - hkd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - myr?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - nok?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - nzd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - sek?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - sgd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - /** currency_specific_config */ - usd?: { - fixed_amounts?: (number)[]; - percentages?: (number)[]; - smart_tip_threshold?: number; - }; - } | ""; - /** @description An object containing device type specific settings for Verifone P400 readers */ - verifone_p400?: ({ - splashscreen?: string | ""; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: ({ + splashscreen?: string | ""; + }) | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: { + /** currency_specific_config */ + aud?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + cad?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + chf?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + czk?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + dkk?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + eur?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + gbp?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + hkd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + myr?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nok?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nzd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sek?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sgd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + usd?: { + fixed_amounts?: (number)[]; + percentages?: (number)[]; + smart_tip_threshold?: number; + }; + } | ""; + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: ({ + splashscreen?: string | ""; + }) | ""; + }; }; }; responses: { @@ -38068,7 +38805,7 @@ export interface operations { }; }; }; - "DeleteTerminalConfigurationsConfiguration": { + DeleteTerminalConfigurationsConfiguration: { /** @description

Deletes a Configuration object.

*/ parameters: { path: { @@ -38076,7 +38813,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38093,14 +38832,16 @@ export interface operations { }; }; }; - "PostTerminalConnectionTokens": { + PostTerminalConnectionTokens: { /** @description

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

*/ requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string; + }; }; }; responses: { @@ -38118,7 +38859,7 @@ export interface operations { }; }; }; - "GetTerminalLocations": { + GetTerminalLocations: { /** @description

Returns a list of Location objects.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -38133,7 +38874,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38161,35 +38904,37 @@ export interface operations { }; }; }; - "PostTerminalLocations": { + PostTerminalLocations: { /** * @description

Creates a new Location object. * For further details, including which address fields are required in each country, see the Manage locations guide.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string; - country: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * create_location_address_param + * @description The full address of the location. + */ + address: { + city?: string; + country: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string; + /** @description A name for the location. */ + display_name: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; }; - /** @description The ID of a configuration that will be used to customize all readers in this location. */ - configuration_overrides?: string; - /** @description A name for the location. */ - display_name: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; }; }; responses: { @@ -38207,7 +38952,7 @@ export interface operations { }; }; }; - "GetTerminalLocationsLocation": { + GetTerminalLocationsLocation: { /** @description

Retrieves a Location object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -38219,7 +38964,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38236,7 +38983,7 @@ export interface operations { }; }; }; - "PostTerminalLocationsLocation": { + PostTerminalLocationsLocation: { /** @description

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

*/ parameters: { path: { @@ -38244,29 +38991,31 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string; + /** @description A name for the location. */ + display_name?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; }; - /** @description The ID of a configuration that will be used to customize all readers in this location. */ - configuration_overrides?: string; - /** @description A name for the location. */ - display_name?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; }; }; responses: { @@ -38284,7 +39033,7 @@ export interface operations { }; }; }; - "DeleteTerminalLocationsLocation": { + DeleteTerminalLocationsLocation: { /** @description

Deletes a Location object.

*/ parameters: { path: { @@ -38292,7 +39041,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38309,7 +39060,7 @@ export interface operations { }; }; }; - "GetTerminalReaders": { + GetTerminalReaders: { /** @description

Returns a list of Reader objects.

*/ parameters?: { /** @description Filters readers by device type */ @@ -38330,7 +39081,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38359,22 +39112,24 @@ export interface operations { }; }; }; - "PostTerminalReaders": { + PostTerminalReaders: { /** @description

Creates a new Reader object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string; - /** @description The location to assign the reader to. */ - location?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string; + /** @description The location to assign the reader to. */ + location?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string; + }; }; }; responses: { @@ -38392,7 +39147,7 @@ export interface operations { }; }; }; - "GetTerminalReadersReader": { + GetTerminalReadersReader: { /** @description

Retrieves a Reader object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -38404,7 +39159,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38421,7 +39178,7 @@ export interface operations { }; }; }; - "PostTerminalReadersReader": { + PostTerminalReadersReader: { /** @description

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

*/ parameters: { path: { @@ -38429,15 +39186,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The new label of the reader. */ - label?: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The new label of the reader. */ + label?: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -38455,7 +39214,7 @@ export interface operations { }; }; }; - "DeleteTerminalReadersReader": { + DeleteTerminalReadersReader: { /** @description

Deletes a Reader object.

*/ parameters: { path: { @@ -38463,7 +39222,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38480,7 +39241,7 @@ export interface operations { }; }; }; - "PostTerminalReadersReaderCancelAction": { + PostTerminalReadersReaderCancelAction: { /** @description

Cancels the current reader action.

*/ parameters: { path: { @@ -38488,9 +39249,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38508,7 +39271,7 @@ export interface operations { }; }; }; - "PostTerminalReadersReaderProcessPaymentIntent": { + PostTerminalReadersReaderProcessPaymentIntent: { /** @description

Initiates a payment flow on a Reader.

*/ parameters: { path: { @@ -38516,20 +39279,22 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description PaymentIntent ID */ - payment_intent: string; - /** - * process_config - * @description Configuration overrides - */ - process_config?: { - skip_tipping?: boolean; - /** tipping_config */ - tipping?: { - amount_eligible?: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description PaymentIntent ID */ + payment_intent: string; + /** + * process_config + * @description Configuration overrides + */ + process_config?: { + skip_tipping?: boolean; + /** tipping_config */ + tipping?: { + amount_eligible?: number; + }; }; }; }; @@ -38549,7 +39314,7 @@ export interface operations { }; }; }; - "PostTerminalReadersReaderProcessSetupIntent": { + PostTerminalReadersReaderProcessSetupIntent: { /** @description

Initiates a setup intent flow on a Reader.

*/ parameters: { path: { @@ -38557,13 +39322,15 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Customer Consent Collected */ - customer_consent_collected: boolean; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description SetupIntent ID */ - setup_intent: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description SetupIntent ID */ + setup_intent: string; + }; }; }; responses: { @@ -38581,7 +39348,7 @@ export interface operations { }; }; }; - "PostTerminalReadersReaderSetReaderDisplay": { + PostTerminalReadersReaderSetReaderDisplay: { /** @description

Sets reader display to show cart details.

*/ parameters: { path: { @@ -38589,28 +39356,30 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** - * cart - * @description Cart - */ - cart?: { - currency: string; - line_items: ({ - amount: number; - description: string; - quantity: number; - })[]; - tax?: number; - total: number; + content: { + "application/x-www-form-urlencoded": { + /** + * cart + * @description Cart + */ + cart?: { + currency: string; + line_items: ({ + amount: number; + description: string; + quantity: number; + })[]; + tax?: number; + total: number; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Type + * @enum {string} + */ + type: "cart"; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Type - * @enum {string} - */ - type: "cart"; }; }; responses: { @@ -38628,7 +39397,7 @@ export interface operations { }; }; }; - "PostTestHelpersCustomersCustomerFundCashBalance": { + PostTestHelpersCustomersCustomerFundCashBalance: { /** @description

Create an incoming testmode bank transfer

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

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

*/ parameters: { path: { @@ -38670,9 +39441,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38690,7 +39463,7 @@ export interface operations { }; }; }; - "PostTestHelpersIssuingCardsCardShippingFail": { + PostTestHelpersIssuingCardsCardShippingFail: { /** @description

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

*/ parameters: { path: { @@ -38698,9 +39471,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38718,7 +39493,7 @@ export interface operations { }; }; }; - "PostTestHelpersIssuingCardsCardShippingReturn": { + PostTestHelpersIssuingCardsCardShippingReturn: { /** @description

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

*/ parameters: { path: { @@ -38726,9 +39501,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38746,7 +39523,7 @@ export interface operations { }; }; }; - "PostTestHelpersIssuingCardsCardShippingShip": { + PostTestHelpersIssuingCardsCardShippingShip: { /** @description

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

*/ parameters: { path: { @@ -38754,9 +39531,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38774,7 +39553,7 @@ export interface operations { }; }; }; - "PostTestHelpersRefundsRefundExpire": { + PostTestHelpersRefundsRefundExpire: { /** @description

Expire a refund with a status of requires_action.

*/ parameters: { path: { @@ -38782,9 +39561,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -38802,7 +39583,7 @@ export interface operations { }; }; }; - "PostTestHelpersTerminalReadersReaderPresentPaymentMethod": { + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { /** @description

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

*/ parameters: { path: { @@ -38810,21 +39591,23 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** - * card_present - * @description Simulated data for the card_present payment method - */ - card_present?: { - number?: string; + content: { + "application/x-www-form-urlencoded": { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * @description Simulated payment type + * @enum {string} + */ + type?: "card_present"; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * @description Simulated payment type - * @enum {string} - */ - type?: "card_present"; }; }; responses: { @@ -38842,7 +39625,7 @@ export interface operations { }; }; }; - "GetTestHelpersTestClocks": { + GetTestHelpersTestClocks: { /** @description

Returns a list of your test clocks.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -38857,7 +39640,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38885,19 +39670,21 @@ export interface operations { }; }; }; - "PostTestHelpersTestClocks": { + PostTestHelpersTestClocks: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description The initial frozen time for this test clock. - */ - frozen_time: number; - /** @description The name for this test clock. */ - name?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + frozen_time: number; + /** @description The name for this test clock. */ + name?: string; + }; }; }; responses: { @@ -38915,7 +39702,7 @@ export interface operations { }; }; }; - "GetTestHelpersTestClocksTestClock": { + GetTestHelpersTestClocksTestClock: { /** @description

Retrieves a test clock.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -38927,7 +39714,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38944,7 +39733,7 @@ export interface operations { }; }; }; - "DeleteTestHelpersTestClocksTestClock": { + DeleteTestHelpersTestClocksTestClock: { /** @description

Deletes a test clock.

*/ parameters: { path: { @@ -38952,7 +39741,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -38969,7 +39760,7 @@ export interface operations { }; }; }; - "PostTestHelpersTestClocksTestClockAdvance": { + PostTestHelpersTestClocksTestClockAdvance: { /** @description

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

*/ parameters: { path: { @@ -38977,14 +39768,16 @@ export interface operations { }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * Format: unix-time - * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. - */ - frozen_time: number; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + frozen_time: number; + }; }; }; responses: { @@ -39002,7 +39795,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryInboundTransfersIdFail": { + PostTestHelpersTreasuryInboundTransfersIdFail: { /** @description

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

*/ parameters: { path: { @@ -39010,16 +39803,18 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * failure_details_params - * @description Details about a failed InboundTransfer. - */ - failure_details?: { - /** @enum {string} */ - code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "debit_not_authorized" | "incorrect_account_holder_address" | "incorrect_account_holder_name" | "incorrect_account_holder_tax_id" | "insufficient_funds" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * failure_details_params + * @description Details about a failed InboundTransfer. + */ + failure_details?: { + /** @enum {string} */ + code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "debit_not_authorized" | "incorrect_account_holder_address" | "incorrect_account_holder_name" | "incorrect_account_holder_tax_id" | "insufficient_funds" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + }; }; }; }; @@ -39038,7 +39833,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryInboundTransfersIdReturn": { + PostTestHelpersTreasuryInboundTransfersIdReturn: { /** @description

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

*/ parameters: { path: { @@ -39046,9 +39841,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39066,7 +39863,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryInboundTransfersIdSucceed": { + PostTestHelpersTreasuryInboundTransfersIdSucceed: { /** @description

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

*/ parameters: { path: { @@ -39074,9 +39871,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39094,7 +39893,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundPaymentsIdFail": { + PostTestHelpersTreasuryOutboundPaymentsIdFail: { /** @description

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

*/ parameters: { path: { @@ -39102,9 +39901,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39122,7 +39923,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundPaymentsIdPost": { + PostTestHelpersTreasuryOutboundPaymentsIdPost: { /** @description

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

*/ parameters: { path: { @@ -39130,9 +39931,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39150,7 +39953,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundPaymentsIdReturn": { + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { /** @description

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

*/ parameters: { path: { @@ -39158,16 +39961,18 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * returned_details_params - * @description Optional hash to set the the return code. - */ - returned_details?: { - /** @enum {string} */ - code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "declined" | "incorrect_account_holder_name" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * returned_details_params + * @description Optional hash to set the the return code. + */ + returned_details?: { + /** @enum {string} */ + code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "declined" | "incorrect_account_holder_name" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + }; }; }; }; @@ -39186,7 +39991,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail": { + PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { /** @description

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

*/ parameters: { path: { @@ -39194,9 +39999,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39214,7 +40021,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost": { + PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { /** @description

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

*/ parameters: { path: { @@ -39222,9 +40029,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39242,7 +40051,7 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn": { + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { /** @description

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

*/ parameters: { path: { @@ -39250,16 +40059,18 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * returned_details_params - * @description Details about a returned OutboundTransfer. - */ - returned_details?: { - /** @enum {string} */ - code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "declined" | "incorrect_account_holder_name" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: "account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "declined" | "incorrect_account_holder_name" | "invalid_account_number" | "invalid_currency" | "no_account" | "other"; + }; }; }; }; @@ -39278,39 +40089,41 @@ export interface operations { }; }; }; - "PostTestHelpersTreasuryReceivedCredits": { + PostTestHelpersTreasuryReceivedCredits: { /** @description

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

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

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

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

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

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

Retrieves the token with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -39714,7 +40531,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -39731,7 +40550,7 @@ export interface operations { }; }; }; - "GetTopups": { + GetTopups: { /** @description

Returns a list of top-ups.

*/ parameters?: { /** @description A positive integer representing how much to transfer. */ @@ -39762,7 +40581,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -39790,28 +40611,30 @@ export interface operations { }; }; }; - "PostTopups": { + PostTopups: { /** @description

Top up the balance of an account

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

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -39841,7 +40664,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -39858,7 +40683,7 @@ export interface operations { }; }; }; - "PostTopupsTopup": { + PostTopupsTopup: { /** @description

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

*/ parameters: { path: { @@ -39866,15 +40691,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -39892,7 +40719,7 @@ export interface operations { }; }; }; - "PostTopupsTopupCancel": { + PostTopupsTopupCancel: { /** @description

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

*/ parameters: { path: { @@ -39900,9 +40727,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -39920,7 +40749,7 @@ export interface operations { }; }; }; - "GetTransfers": { + GetTransfers: { /** @description

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

*/ parameters?: { /** @description Only return transfers for the destination specified by this account ID. */ @@ -39945,7 +40774,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -39974,33 +40805,35 @@ export interface operations { }; }; }; - "PostTransfers": { + PostTransfers: { /** @description

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

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

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

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -40036,7 +40869,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40065,7 +40900,7 @@ export interface operations { }; }; }; - "PostTransfersIdReversals": { + PostTransfersIdReversals: { /** * @description

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

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

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40121,7 +40958,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40138,7 +40977,7 @@ export interface operations { }; }; }; - "PostTransfersTransfer": { + PostTransfersTransfer: { /** * @description

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

* @@ -40150,15 +40989,17 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -40176,7 +41017,7 @@ export interface operations { }; }; }; - "GetTransfersTransferReversalsId": { + GetTransfersTransferReversalsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40189,7 +41030,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40206,7 +41049,7 @@ export interface operations { }; }; }; - "PostTransfersTransferReversalsId": { + PostTransfersTransferReversalsId: { /** * @description

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

* @@ -40219,13 +41062,15 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + }; }; }; responses: { @@ -40243,7 +41088,7 @@ export interface operations { }; }; }; - "GetTreasuryCreditReversals": { + GetTreasuryCreditReversals: { /** @description

Returns a list of CreditReversals.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -40264,7 +41109,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40293,18 +41140,20 @@ export interface operations { }; }; }; - "PostTreasuryCreditReversals": { + PostTreasuryCreditReversals: { /** @description

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The ReceivedCredit to reverse. */ + received_credit: string; }; - /** @description The ReceivedCredit to reverse. */ - received_credit: string; }; }; responses: { @@ -40322,7 +41171,7 @@ export interface operations { }; }; }; - "GetTreasuryCreditReversalsCreditReversal": { + GetTreasuryCreditReversalsCreditReversal: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40334,7 +41183,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40351,7 +41202,7 @@ export interface operations { }; }; }; - "GetTreasuryDebitReversals": { + GetTreasuryDebitReversals: { /** @description

Returns a list of DebitReversals.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -40374,7 +41225,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40403,18 +41256,20 @@ export interface operations { }; }; }; - "PostTreasuryDebitReversals": { + PostTreasuryDebitReversals: { /** @description

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The ReceivedDebit to reverse. */ + received_debit: string; }; - /** @description The ReceivedDebit to reverse. */ - received_debit: string; }; }; responses: { @@ -40432,7 +41287,7 @@ export interface operations { }; }; }; - "GetTreasuryDebitReversalsDebitReversal": { + GetTreasuryDebitReversalsDebitReversal: { /** @description

Retrieves a DebitReversal object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40444,7 +41299,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40461,7 +41318,7 @@ export interface operations { }; }; }; - "GetTreasuryFinancialAccounts": { + GetTreasuryFinancialAccounts: { /** @description

Returns a list of FinancialAccounts.

*/ parameters?: { /** @description An object ID cursor for use in pagination. */ @@ -40482,7 +41339,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40510,82 +41369,84 @@ export interface operations { }; }; }; - "PostTreasuryFinancialAccounts": { + PostTreasuryFinancialAccounts: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * feature_access - * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. - */ - features?: { - /** access */ - card_issuing?: { - requested: boolean; - }; - /** access */ - deposit_insurance?: { - requested: boolean; - }; - /** financial_addresses */ - financial_addresses?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + features?: { /** access */ - aba?: { + card_issuing?: { requested: boolean; }; - }; - /** inbound_transfers */ - inbound_transfers?: { - /** access_with_ach_details */ - ach?: { + /** access */ + deposit_insurance?: { requested: boolean; }; - }; - /** access */ - intra_stripe_flows?: { - requested: boolean; - }; - /** outbound_payments */ - outbound_payments?: { - /** access_with_ach_details */ - ach?: { - requested: boolean; + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean; + }; + }; + /** inbound_transfers */ + inbound_transfers?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; }; /** access */ - us_domestic_wire?: { + intra_stripe_flows?: { requested: boolean; }; - }; - /** outbound_transfers */ - outbound_transfers?: { - /** access_with_ach_details */ - ach?: { - requested: boolean; + /** outbound_payments */ + outbound_payments?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; }; - /** access */ - us_domestic_wire?: { - requested: boolean; + /** outbound_transfers */ + outbound_transfers?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; }; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: "restricted" | "unrestricted"; + /** @enum {string} */ + outbound_flows?: "restricted" | "unrestricted"; + }; + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: (string)[]; }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * platform_restrictions - * @description The set of functionalities that the platform can restrict on the FinancialAccount. - */ - platform_restrictions?: { - /** @enum {string} */ - inbound_flows?: "restricted" | "unrestricted"; - /** @enum {string} */ - outbound_flows?: "restricted" | "unrestricted"; - }; - /** @description The currencies the FinancialAccount can hold a balance in. */ - supported_currencies: (string)[]; }; }; responses: { @@ -40603,7 +41464,7 @@ export interface operations { }; }; }; - "GetTreasuryFinancialAccountsFinancialAccount": { + GetTreasuryFinancialAccountsFinancialAccount: { /** @description

Retrieves the details of a FinancialAccount.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40615,7 +41476,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40632,7 +41495,7 @@ export interface operations { }; }; }; - "PostTreasuryFinancialAccountsFinancialAccount": { + PostTreasuryFinancialAccountsFinancialAccount: { /** @description

Updates the details of a FinancialAccount.

*/ parameters: { path: { @@ -40640,76 +41503,78 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** - * feature_access - * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. - */ - features?: { - /** access */ - card_issuing?: { - requested: boolean; - }; - /** access */ - deposit_insurance?: { - requested: boolean; - }; - /** financial_addresses */ - financial_addresses?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { /** access */ - aba?: { + card_issuing?: { requested: boolean; }; - }; - /** inbound_transfers */ - inbound_transfers?: { - /** access_with_ach_details */ - ach?: { + /** access */ + deposit_insurance?: { requested: boolean; }; - }; - /** access */ - intra_stripe_flows?: { - requested: boolean; - }; - /** outbound_payments */ - outbound_payments?: { - /** access_with_ach_details */ - ach?: { - requested: boolean; + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean; + }; + }; + /** inbound_transfers */ + inbound_transfers?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; }; /** access */ - us_domestic_wire?: { + intra_stripe_flows?: { requested: boolean; }; - }; - /** outbound_transfers */ - outbound_transfers?: { - /** access_with_ach_details */ - ach?: { - requested: boolean; + /** outbound_payments */ + outbound_payments?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; }; - /** access */ - us_domestic_wire?: { - requested: boolean; + /** outbound_transfers */ + outbound_transfers?: { + /** access_with_ach_details */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; }; }; - }; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; - }; - /** - * platform_restrictions - * @description The set of functionalities that the platform can restrict on the FinancialAccount. - */ - platform_restrictions?: { - /** @enum {string} */ - inbound_flows?: "restricted" | "unrestricted"; - /** @enum {string} */ - outbound_flows?: "restricted" | "unrestricted"; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: "restricted" | "unrestricted"; + /** @enum {string} */ + outbound_flows?: "restricted" | "unrestricted"; + }; }; }; }; @@ -40728,7 +41593,7 @@ export interface operations { }; }; }; - "GetTreasuryFinancialAccountsFinancialAccountFeatures": { + GetTreasuryFinancialAccountsFinancialAccountFeatures: { /** @description

Retrieves Features information associated with the FinancialAccount.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40740,7 +41605,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40757,7 +41624,7 @@ export interface operations { }; }; }; - "PostTreasuryFinancialAccountsFinancialAccountFeatures": { + PostTreasuryFinancialAccountsFinancialAccountFeatures: { /** @description

Updates the Features associated with a FinancialAccount.

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

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -40873,7 +41742,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40902,28 +41773,30 @@ export interface operations { }; }; }; - "PostTreasuryInboundTransfers": { + PostTreasuryInboundTransfers: { /** @description

Creates an InboundTransfer.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Amount (in cents) to be transferred. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The FinancialAccount to send funds to. */ - financial_account: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The FinancialAccount to send funds to. */ + financial_account: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string; + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + statement_descriptor?: string; }; - /** @description The origin payment method to be debited for the InboundTransfer. */ - origin_payment_method: string; - /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ - statement_descriptor?: string; }; }; responses: { @@ -40941,7 +41814,7 @@ export interface operations { }; }; }; - "GetTreasuryInboundTransfersId": { + GetTreasuryInboundTransfersId: { /** @description

Retrieves the details of an existing InboundTransfer.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -40953,7 +41826,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -40970,7 +41845,7 @@ export interface operations { }; }; }; - "PostTreasuryInboundTransfersInboundTransferCancel": { + PostTreasuryInboundTransfersInboundTransferCancel: { /** @description

Cancels an InboundTransfer.

*/ parameters: { path: { @@ -40978,9 +41853,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -40998,7 +41875,7 @@ export interface operations { }; }; }; - "GetTreasuryOutboundPayments": { + GetTreasuryOutboundPayments: { /** @description

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ parameters: { /** @description Only return OutboundPayments sent to this customer. */ @@ -41019,7 +41896,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41048,84 +41927,86 @@ export interface operations { }; }; }; - "PostTreasuryOutboundPayments": { + PostTreasuryOutboundPayments: { /** @description

Creates an OutboundPayment.

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

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41155,7 +42036,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41172,7 +42055,7 @@ export interface operations { }; }; }; - "PostTreasuryOutboundPaymentsIdCancel": { + PostTreasuryOutboundPaymentsIdCancel: { /** @description

Cancel an OutboundPayment.

*/ parameters: { path: { @@ -41180,9 +42063,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -41200,7 +42085,7 @@ export interface operations { }; }; }; - "GetTreasuryOutboundTransfers": { + GetTreasuryOutboundTransfers: { /** @description

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41219,7 +42104,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41248,38 +42135,40 @@ export interface operations { }; }; }; - "PostTreasuryOutboundTransfers": { + PostTreasuryOutboundTransfers: { /** @description

Creates an OutboundTransfer.

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** @description Amount (in cents) to be transferred. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ - destination_payment_method?: string; - /** - * payment_method_options - * @description Hash describing payment method configuration details. - */ - destination_payment_method_options?: { - us_bank_account?: ({ - /** @enum {string} */ - network?: "ach" | "us_domestic_wire"; - }) | ""; - }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description The FinancialAccount to pull funds from. */ - financial_account: string; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { - [key: string]: string | undefined; + content: { + "application/x-www-form-urlencoded": { + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string; + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: ({ + /** @enum {string} */ + network?: "ach" | "us_domestic_wire"; + }) | ""; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description The FinancialAccount to pull funds from. */ + financial_account: string; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { + [key: string]: string | undefined; + }; + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: string; }; - /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ - statement_descriptor?: string; }; }; responses: { @@ -41297,7 +42186,7 @@ export interface operations { }; }; }; - "GetTreasuryOutboundTransfersOutboundTransfer": { + GetTreasuryOutboundTransfersOutboundTransfer: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41309,7 +42198,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41326,7 +42217,7 @@ export interface operations { }; }; }; - "PostTreasuryOutboundTransfersOutboundTransferCancel": { + PostTreasuryOutboundTransfersOutboundTransferCancel: { /** @description

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

*/ parameters: { path: { @@ -41334,9 +42225,11 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + }; }; }; responses: { @@ -41354,7 +42247,7 @@ export interface operations { }; }; }; - "GetTreasuryReceivedCredits": { + GetTreasuryReceivedCredits: { /** @description

Returns a list of ReceivedCredits.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41378,7 +42271,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41407,7 +42302,7 @@ export interface operations { }; }; }; - "GetTreasuryReceivedCreditsId": { + GetTreasuryReceivedCreditsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41419,7 +42314,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41436,7 +42333,7 @@ export interface operations { }; }; }; - "GetTreasuryReceivedDebits": { + GetTreasuryReceivedDebits: { /** @description

Returns a list of ReceivedDebits.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41455,7 +42352,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41484,7 +42383,7 @@ export interface operations { }; }; }; - "GetTreasuryReceivedDebitsId": { + GetTreasuryReceivedDebitsId: { /** @description

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

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41496,7 +42395,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41513,7 +42414,7 @@ export interface operations { }; }; }; - "GetTreasuryTransactionEntries": { + GetTreasuryTransactionEntries: { /** @description

Retrieves a list of TransactionEntry objects.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41546,7 +42447,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41575,7 +42478,7 @@ export interface operations { }; }; }; - "GetTreasuryTransactionEntriesId": { + GetTreasuryTransactionEntriesId: { /** @description

Retrieves a TransactionEntry object.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41587,7 +42490,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41604,7 +42509,7 @@ export interface operations { }; }; }; - "GetTreasuryTransactions": { + GetTreasuryTransactions: { /** @description

Retrieves a list of Transaction objects.

*/ parameters: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41640,7 +42545,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41669,7 +42576,7 @@ export interface operations { }; }; }; - "GetTreasuryTransactionsId": { + GetTreasuryTransactionsId: { /** @description

Retrieves the details of an existing Transaction.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41681,7 +42588,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41698,7 +42607,7 @@ export interface operations { }; }; }; - "GetWebhookEndpoints": { + GetWebhookEndpoints: { /** @description

Returns a list of your webhook endpoints.

*/ parameters?: { /** @description A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41713,7 +42622,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41741,29 +42652,31 @@ export interface operations { }; }; }; - "PostWebhookEndpoints": { + PostWebhookEndpoints: { /** @description

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

*/ requestBody: { - "application/x-www-form-urlencoded": { - /** - * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - * @enum {string} - */ - api_version?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01"; - /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ - connect?: boolean; - /** @description An optional description of what the webhook is used for. */ - description?: string; - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events: ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "file.created" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoiceitem.created" | "invoiceitem.deleted" | "invoiceitem.updated" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" | "order.created" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "recipient.created" | "recipient.deleted" | "recipient.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "sku.created" | "sku.deleted" | "sku.updated" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[]; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The URL of the webhook endpoint. */ - url: string; + content: { + "application/x-www-form-urlencoded": { + /** + * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + * @enum {string} + */ + api_version?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01"; + /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ + connect?: boolean; + /** @description An optional description of what the webhook is used for. */ + description?: string; + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events: ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "file.created" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoiceitem.created" | "invoiceitem.deleted" | "invoiceitem.updated" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" | "order.created" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "recipient.created" | "recipient.deleted" | "recipient.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "sku.created" | "sku.deleted" | "sku.updated" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[]; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The URL of the webhook endpoint. */ + url: string; + }; }; }; responses: { @@ -41781,7 +42694,7 @@ export interface operations { }; }; }; - "GetWebhookEndpointsWebhookEndpoint": { + GetWebhookEndpointsWebhookEndpoint: { /** @description

Retrieves the webhook endpoint with the given ID.

*/ parameters: { /** @description Specifies which fields in the response should be expanded. */ @@ -41793,7 +42706,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41810,7 +42725,7 @@ export interface operations { }; }; }; - "PostWebhookEndpointsWebhookEndpoint": { + PostWebhookEndpointsWebhookEndpoint: { /** @description

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

*/ parameters: { path: { @@ -41818,21 +42733,23 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": { - /** @description An optional description of what the webhook is used for. */ - description?: string; - /** @description Disable the webhook endpoint if set to true. */ - disabled?: boolean; - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events?: ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "file.created" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoiceitem.created" | "invoiceitem.deleted" | "invoiceitem.updated" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" | "order.created" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "recipient.created" | "recipient.deleted" | "recipient.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "sku.created" | "sku.deleted" | "sku.updated" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[]; - /** @description Specifies which fields in the response should be expanded. */ - expand?: (string)[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ - [key: string]: string | undefined; - }) | ""; - /** @description The URL of the webhook endpoint. */ - url?: string; + content: { + "application/x-www-form-urlencoded": { + /** @description An optional description of what the webhook is used for. */ + description?: string; + /** @description Disable the webhook endpoint if set to true. */ + disabled?: boolean; + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events?: ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "file.created" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoiceitem.created" | "invoiceitem.deleted" | "invoiceitem.updated" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" | "order.created" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "recipient.created" | "recipient.deleted" | "recipient.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "sku.created" | "sku.deleted" | "sku.updated" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[]; + /** @description Specifies which fields in the response should be expanded. */ + expand?: (string)[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ + [key: string]: string | undefined; + }) | ""; + /** @description The URL of the webhook endpoint. */ + url?: string; + }; }; }; responses: { @@ -41850,7 +42767,7 @@ export interface operations { }; }; }; - "DeleteWebhookEndpointsWebhookEndpoint": { + DeleteWebhookEndpointsWebhookEndpoint: { /** @description

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

*/ parameters: { path: { @@ -41858,7 +42775,9 @@ export interface operations { }; }; requestBody?: { - "application/x-www-form-urlencoded": Record; + content: { + "application/x-www-form-urlencoded": Record; + }; }; responses: { /** @description Successful response. */ @@ -41876,5 +42795,3 @@ export interface operations { }; }; } - -export type external = Record; diff --git a/package.json b/package.json index 32dc097a1..3809d3885 100644 --- a/package.json +++ b/package.json @@ -37,38 +37,41 @@ "scripts": { "build": "del dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch", - "download:schemas": "node ./scripts/download-schemas.js", + "download:schemas": "vite-node ./scripts/download-schemas.ts", "format": "npm run prettier -w .", "lint": "eslint .", "pregenerate": "npm run build", - "prepare": "npm run build && npm run download:schemas", + "prepare": "npm run build", + "postinstall": "npm run download:schemas", "test": "vitest run", "test:coverage": "vitest run --coverage", - "update:examples": "node ./scripts/update-examples.js", + "update:examples": "vite-node ./scripts/update-examples.ts", "version": "npm run build" }, "dependencies": { + "ansi-colors": "^4.1.3", "fast-glob": "^3.2.12", "js-yaml": "^4.1.0", - "mime": "^3.0.0", + "supports-color": "^9.2.3", "undici": "^5.12.0", "yargs-parser": "^21.1.1" }, "devDependencies": { + "@types/degit": "^2.8.3", "@types/js-yaml": "^4.0.5", - "@types/mime": "^2.0.3", "@types/node": "^18.11.9", - "@typescript-eslint/eslint-plugin": "^5.42.0", - "@typescript-eslint/parser": "^5.42.0", - "@vitest/coverage-c8": "^0.24.5", + "@typescript-eslint/eslint-plugin": "^5.42.1", + "@typescript-eslint/parser": "^5.42.1", + "@vitest/coverage-c8": "^0.25.1", + "degit": "^2.8.4", "del-cli": "^5.0.0", - "eol": "^0.9.1", - "eslint": "^8.26.0", + "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", "execa": "^6.1.0", "prettier": "^2.7.1", "typescript": "^4.8.4", - "vitest": "^0.24.5" + "vite-node": "^0.25.1", + "vitest": "^0.25.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22fc9670f..2cd05ca39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,50 +1,54 @@ lockfileVersion: 5.4 specifiers: + '@types/degit': ^2.8.3 '@types/js-yaml': ^4.0.5 - '@types/mime': ^2.0.3 '@types/node': ^18.11.9 - '@typescript-eslint/eslint-plugin': ^5.42.0 - '@typescript-eslint/parser': ^5.42.0 - '@vitest/coverage-c8': ^0.24.5 + '@typescript-eslint/eslint-plugin': ^5.42.1 + '@typescript-eslint/parser': ^5.42.1 + '@vitest/coverage-c8': ^0.25.1 + ansi-colors: ^4.1.3 + degit: ^2.8.4 del-cli: ^5.0.0 - eol: ^0.9.1 - eslint: ^8.26.0 + eslint: ^8.27.0 eslint-config-prettier: ^8.5.0 eslint-plugin-prettier: ^4.2.1 execa: ^6.1.0 fast-glob: ^3.2.12 js-yaml: ^4.1.0 - mime: ^3.0.0 prettier: ^2.7.1 + supports-color: ^9.2.3 typescript: ^4.8.4 undici: ^5.12.0 - vitest: ^0.24.5 + vite-node: ^0.25.1 + vitest: ^0.25.1 yargs-parser: ^21.1.1 dependencies: + ansi-colors: 4.1.3 fast-glob: 3.2.12 js-yaml: 4.1.0 - mime: 3.0.0 + supports-color: 9.2.3 undici: 5.12.0 yargs-parser: 21.1.1 devDependencies: + '@types/degit': 2.8.3 '@types/js-yaml': 4.0.5 - '@types/mime': 2.0.3 '@types/node': 18.11.9 - '@typescript-eslint/eslint-plugin': 5.42.0_6xw5wg2354iw4zujk2f3vyfrzu - '@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m - '@vitest/coverage-c8': 0.24.5 + '@typescript-eslint/eslint-plugin': 5.42.1_7pz6ylmrfwzae3u6xeomun7yji + '@typescript-eslint/parser': 5.42.1_ux4hwh2nsir2cof7kssisbz7uy + '@vitest/coverage-c8': 0.25.1_supports-color@9.2.3 + degit: 2.8.4 del-cli: 5.0.0 - eol: 0.9.1 - eslint: 8.26.0 - eslint-config-prettier: 8.5.0_eslint@8.26.0 - eslint-plugin-prettier: 4.2.1_aniwkeyvlpmwkidetuytnokvcm + eslint: 8.27.0_supports-color@9.2.3 + eslint-config-prettier: 8.5.0_eslint@8.27.0 + eslint-plugin-prettier: 4.2.1_v7o5sx5x3wbs57ifz6wc4f76we execa: 6.1.0 prettier: 2.7.1 typescript: 4.8.4 - vitest: 0.24.5 + vite-node: 0.25.1_d43diowfqaqszqvwpgac3z5zra + vitest: 0.25.1_supports-color@9.2.3 packages: @@ -91,13 +95,13 @@ packages: dev: true optional: true - /@eslint/eslintrc/1.3.3: + /@eslint/eslintrc/1.3.3_supports-color@9.2.3: resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 - espree: 9.4.0 + debug: 4.3.4_supports-color@9.2.3 + espree: 9.4.1 globals: 13.17.0 ignore: 5.2.0 import-fresh: 3.3.0 @@ -108,12 +112,12 @@ packages: - supports-color dev: true - /@humanwhocodes/config-array/0.11.7: + /@humanwhocodes/config-array/0.11.7_supports-color@9.2.3: resolution: {integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 + debug: 4.3.4_supports-color@9.2.3 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -170,11 +174,15 @@ packages: /@types/chai-subset/1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: - '@types/chai': 4.3.3 + '@types/chai': 4.3.4 dev: true - /@types/chai/4.3.3: - resolution: {integrity: sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==} + /@types/chai/4.3.4: + resolution: {integrity: sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==} + dev: true + + /@types/degit/2.8.3: + resolution: {integrity: sha512-CL7y71j2zaDmtPLD5Xq5S1Gv2dFoHl0/GBZm6s39Mj/ls28L3NzAOqf7H4H0/2TNVMgMjMVf9CAFYSjmXhi3bw==} dev: true /@types/istanbul-lib-coverage/2.0.4: @@ -189,10 +197,6 @@ packages: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true - /@types/mime/2.0.3: - resolution: {integrity: sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==} - dev: true - /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true @@ -209,8 +213,8 @@ packages: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true - /@typescript-eslint/eslint-plugin/5.42.0_6xw5wg2354iw4zujk2f3vyfrzu: - resolution: {integrity: sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ==} + /@typescript-eslint/eslint-plugin/5.42.1_7pz6ylmrfwzae3u6xeomun7yji: + resolution: {integrity: sha512-LyR6x784JCiJ1j6sH5Y0K6cdExqCCm8DJUTcwG5ThNXJj/G8o5E56u5EdG4SLy+bZAwZBswC+GYn3eGdttBVCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -220,12 +224,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m - '@typescript-eslint/scope-manager': 5.42.0 - '@typescript-eslint/type-utils': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m - '@typescript-eslint/utils': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m - debug: 4.3.4 - eslint: 8.26.0 + '@typescript-eslint/parser': 5.42.1_ux4hwh2nsir2cof7kssisbz7uy + '@typescript-eslint/scope-manager': 5.42.1 + '@typescript-eslint/type-utils': 5.42.1_ux4hwh2nsir2cof7kssisbz7uy + '@typescript-eslint/utils': 5.42.1_ux4hwh2nsir2cof7kssisbz7uy + debug: 4.3.4_supports-color@9.2.3 + eslint: 8.27.0_supports-color@9.2.3 ignore: 5.2.0 natural-compare-lite: 1.4.0 regexpp: 3.2.0 @@ -236,8 +240,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.42.0_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA==} + /@typescript-eslint/parser/5.42.1_ux4hwh2nsir2cof7kssisbz7uy: + resolution: {integrity: sha512-kAV+NiNBWVQDY9gDJDToTE/NO8BHi4f6b7zTsVAJoTkmB/zlfOpiEVBzHOKtlgTndCKe8vj9F/PuolemZSh50Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -246,26 +250,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.42.0 - '@typescript-eslint/types': 5.42.0 - '@typescript-eslint/typescript-estree': 5.42.0_typescript@4.8.4 - debug: 4.3.4 - eslint: 8.26.0 + '@typescript-eslint/scope-manager': 5.42.1 + '@typescript-eslint/types': 5.42.1 + '@typescript-eslint/typescript-estree': 5.42.1_zfayr4byj5y4lsi7wijpiycui4 + debug: 4.3.4_supports-color@9.2.3 + eslint: 8.27.0_supports-color@9.2.3 typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.42.0: - resolution: {integrity: sha512-l5/3IBHLH0Bv04y+H+zlcLiEMEMjWGaCX6WyHE5Uk2YkSGAMlgdUPsT/ywTSKgu9D1dmmKMYgYZijObfA39Wow==} + /@typescript-eslint/scope-manager/5.42.1: + resolution: {integrity: sha512-QAZY/CBP1Emx4rzxurgqj3rUinfsh/6mvuKbLNMfJMMKYLRBfweus8brgXF8f64ABkIZ3zdj2/rYYtF8eiuksQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.42.0 - '@typescript-eslint/visitor-keys': 5.42.0 + '@typescript-eslint/types': 5.42.1 + '@typescript-eslint/visitor-keys': 5.42.1 dev: true - /@typescript-eslint/type-utils/5.42.0_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-HW14TXC45dFVZxnVW8rnUGnvYyRC0E/vxXShFCthcC9VhVTmjqOmtqj6H5rm9Zxv+ORxKA/1aLGD7vmlLsdlOg==} + /@typescript-eslint/type-utils/5.42.1_ux4hwh2nsir2cof7kssisbz7uy: + resolution: {integrity: sha512-WWiMChneex5w4xPIX56SSnQQo0tEOy5ZV2dqmj8Z371LJ0E+aymWD25JQ/l4FOuuX+Q49A7pzh/CGIQflxMVXg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -274,23 +278,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.42.0_typescript@4.8.4 - '@typescript-eslint/utils': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m - debug: 4.3.4 - eslint: 8.26.0 + '@typescript-eslint/typescript-estree': 5.42.1_zfayr4byj5y4lsi7wijpiycui4 + '@typescript-eslint/utils': 5.42.1_ux4hwh2nsir2cof7kssisbz7uy + debug: 4.3.4_supports-color@9.2.3 + eslint: 8.27.0_supports-color@9.2.3 tsutils: 3.21.0_typescript@4.8.4 typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.42.0: - resolution: {integrity: sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw==} + /@typescript-eslint/types/5.42.1: + resolution: {integrity: sha512-Qrco9dsFF5lhalz+lLFtxs3ui1/YfC6NdXu+RAGBa8uSfn01cjO7ssCsjIsUs484vny9Xm699FSKwpkCcqwWwA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.42.0_typescript@4.8.4: - resolution: {integrity: sha512-2O3vSq794x3kZGtV7i4SCWZWCwjEtkWfVqX4m5fbUBomOsEOyd6OAD1qU2lbvV5S8tgy/luJnOYluNyYVeOTTg==} + /@typescript-eslint/typescript-estree/5.42.1_zfayr4byj5y4lsi7wijpiycui4: + resolution: {integrity: sha512-qElc0bDOuO0B8wDhhW4mYVgi/LZL+igPwXtV87n69/kYC/7NG3MES0jHxJNCr4EP7kY1XVsRy8C/u3DYeTKQmw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -298,9 +302,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.42.0 - '@typescript-eslint/visitor-keys': 5.42.0 - debug: 4.3.4 + '@typescript-eslint/types': 5.42.1 + '@typescript-eslint/visitor-keys': 5.42.1 + debug: 4.3.4_supports-color@9.2.3 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 @@ -310,39 +314,39 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.42.0_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-JZ++3+h1vbeG1NUECXQZE3hg0kias9kOtcQr3+JVQ3whnjvKuMyktJAAIj6743OeNPnGBmjj7KEmiDL7qsdnCQ==} + /@typescript-eslint/utils/5.42.1_ux4hwh2nsir2cof7kssisbz7uy: + resolution: {integrity: sha512-Gxvf12xSp3iYZd/fLqiQRD4uKZjDNR01bQ+j8zvhPjpsZ4HmvEFL/tC4amGNyxN9Rq+iqvpHLhlqx6KTxz9ZyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.42.0 - '@typescript-eslint/types': 5.42.0 - '@typescript-eslint/typescript-estree': 5.42.0_typescript@4.8.4 - eslint: 8.26.0 + '@typescript-eslint/scope-manager': 5.42.1 + '@typescript-eslint/types': 5.42.1 + '@typescript-eslint/typescript-estree': 5.42.1_zfayr4byj5y4lsi7wijpiycui4 + eslint: 8.27.0_supports-color@9.2.3 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.26.0 + eslint-utils: 3.0.0_eslint@8.27.0 semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.42.0: - resolution: {integrity: sha512-QHbu5Hf/2lOEOwy+IUw0GoSCuAzByTAWWrOTKzTzsotiUnWFpuKnXcAhC9YztAf2EElQ0VvIK+pHJUPkM0q7jg==} + /@typescript-eslint/visitor-keys/5.42.1: + resolution: {integrity: sha512-LOQtSF4z+hejmpUvitPlc4hA7ERGoj2BVkesOcG91HCn8edLGUXbTrErmutmPbl8Bo9HjAvOO/zBKQHExXNA2A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.42.0 + '@typescript-eslint/types': 5.42.1 eslint-visitor-keys: 3.3.0 dev: true - /@vitest/coverage-c8/0.24.5: - resolution: {integrity: sha512-955yK/SdSBZPYrSXgXB0F+0JnOX5EY9kSL7ywJ4rNajmkFUhwLjuKm13Xb6YKSyIY/g5WvbBnyowqfNRxBJ3ww==} + /@vitest/coverage-c8/0.25.1_supports-color@9.2.3: + resolution: {integrity: sha512-gpl5QNaNeIN0mfRiosCqBFoZcizb5GA458TDnOQXkGDc4kklazxn70u9evGfV62wiiAUfGGebgRhxlBkAa6m6g==} dependencies: c8: 7.12.0 - vitest: 0.24.5 + vitest: 0.25.1_supports-color@9.2.3 transitivePeerDependencies: - '@edge-runtime/vm' - '@vitest/browser' @@ -365,6 +369,11 @@ packages: acorn: 8.8.1 dev: true + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn/8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} engines: {node: '>=0.4.0'} @@ -388,6 +397,11 @@ packages: uri-js: 4.4.1 dev: true + /ansi-colors/4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: false + /ansi-regex/5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -441,6 +455,10 @@ packages: dependencies: fill-range: 7.0.1 + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /busboy/1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -487,15 +505,15 @@ packages: engines: {node: '>=10'} dev: true - /chai/4.3.6: - resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} + /chai/4.3.7: + resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 check-error: 1.0.2 - deep-eql: 3.0.1 + deep-eql: 4.1.2 get-func-name: 2.0.0 - loupe: 2.3.4 + loupe: 2.3.6 pathval: 1.1.1 type-detect: 4.0.8 dev: true @@ -574,7 +592,7 @@ packages: which: 2.0.2 dev: true - /debug/4.3.4: + /debug/4.3.4_supports-color@9.2.3: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -584,6 +602,7 @@ packages: optional: true dependencies: ms: 2.1.2 + supports-color: 9.2.3 dev: true /decamelize-keys/1.1.1: @@ -604,9 +623,9 @@ packages: engines: {node: '>=10'} dev: true - /deep-eql/3.0.1: - resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} - engines: {node: '>=0.12'} + /deep-eql/4.1.2: + resolution: {integrity: sha512-gT18+YW4CcW/DBNTwAmqTtkJh7f9qqScu2qFVlx7kCoeY9tlBu9cUcr7+I+Z/noG8INehS3xQgLpTtd/QUTn4w==} + engines: {node: '>=6'} dependencies: type-detect: 4.0.8 dev: true @@ -615,6 +634,12 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /degit/2.8.4: + resolution: {integrity: sha512-vqYuzmSA5I50J882jd+AbAhQtgK6bdKUJIex1JNfEUPENCgYsxugzKVZlFyMwV4i06MmnV47/Iqi5Io86zf3Ng==} + engines: {node: '>=8.0.0'} + hasBin: true + dev: true + /del-cli/5.0.0: resolution: {integrity: sha512-rENFhUaYcjoMODwFhhlON+ogN7DoG+4+GFN+bsA1XeDt4w2OKQnQadFP1thHSAlK9FAtl88qgP66wOV+eFZZiQ==} engines: {node: '>=14.16'} @@ -656,10 +681,6 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /eol/0.9.1: - resolution: {integrity: sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==} - dev: true - /error-ex/1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -896,16 +917,16 @@ packages: engines: {node: '>=12'} dev: true - /eslint-config-prettier/8.5.0_eslint@8.26.0: + /eslint-config-prettier/8.5.0_eslint@8.27.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.26.0 + eslint: 8.27.0_supports-color@9.2.3 dev: true - /eslint-plugin-prettier/4.2.1_aniwkeyvlpmwkidetuytnokvcm: + /eslint-plugin-prettier/4.2.1_v7o5sx5x3wbs57ifz6wc4f76we: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -916,8 +937,8 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.26.0 - eslint-config-prettier: 8.5.0_eslint@8.26.0 + eslint: 8.27.0_supports-color@9.2.3 + eslint-config-prettier: 8.5.0_eslint@8.27.0 prettier: 2.7.1 prettier-linter-helpers: 1.0.0 dev: true @@ -938,13 +959,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.26.0: + /eslint-utils/3.0.0_eslint@8.27.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.26.0 + eslint: 8.27.0_supports-color@9.2.3 eslint-visitor-keys: 2.1.0 dev: true @@ -958,25 +979,25 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.26.0: - resolution: {integrity: sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==} + /eslint/8.27.0_supports-color@9.2.3: + resolution: {integrity: sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.3 - '@humanwhocodes/config-array': 0.11.7 + '@eslint/eslintrc': 1.3.3_supports-color@9.2.3 + '@humanwhocodes/config-array': 0.11.7_supports-color@9.2.3 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4_supports-color@9.2.3 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.26.0 + eslint-utils: 3.0.0_eslint@8.27.0 eslint-visitor-keys: 3.3.0 - espree: 9.4.0 + espree: 9.4.1 esquery: 1.4.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -1006,8 +1027,8 @@ packages: - supports-color dev: true - /espree/9.4.0: - resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==} + /espree/9.4.1: + resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.1 @@ -1401,6 +1422,10 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true + /jsonc-parser/3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + /kind-of/6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -1434,8 +1459,8 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /loupe/2.3.4: - resolution: {integrity: sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==} + /loupe/2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} dependencies: get-func-name: 2.0.0 dev: true @@ -1497,12 +1522,6 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /mime/3.0.0: - resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} - engines: {node: '>=10.0.0'} - hasBin: true - dev: false - /mimic-fn/4.0.0: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} @@ -1528,6 +1547,15 @@ packages: kind-of: 6.0.3 dev: true + /mlly/0.5.16: + resolution: {integrity: sha512-LaJ8yuh4v0zEmge/g3c7jjFlhoCPfQn6RCjXgm9A0Qiuochq4BcuOxVfWmdnCoLTlg2MV+hqhOek+W2OhG0Lwg==} + dependencies: + acorn: 8.8.1 + pathe: 0.3.9 + pkg-types: 0.3.6 + ufo: 0.8.6 + dev: true + /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -1655,6 +1683,14 @@ packages: engines: {node: '>=8'} dev: true + /pathe/0.2.0: + resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} + dev: true + + /pathe/0.3.9: + resolution: {integrity: sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g==} + dev: true + /pathval/1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true @@ -1667,6 +1703,14 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + /pkg-types/0.3.6: + resolution: {integrity: sha512-uQZutkkh6axl1GxDm5/+8ivVdwuJ5pyDGqJeSiIWIUWIqYiK3p9QKozN/Rv6eVvFoeSWkN1uoYeSDBwwBJBtbg==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 0.5.16 + pathe: 0.3.9 + dev: true + /postcss/8.4.18: resolution: {integrity: sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==} engines: {node: ^10 || ^12 || >=14} @@ -1826,6 +1870,18 @@ packages: engines: {node: '>=0.10.0'} dev: true + /source-map-support/0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + /spdx-correct/3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: @@ -1906,6 +1962,10 @@ packages: has-flag: 4.0.0 dev: true + /supports-color/9.2.3: + resolution: {integrity: sha512-aszYUX/DVK/ed5rFLb/dDinVJrQjG/vmU433wtqVSD800rYsJNWxh2R3USV90aLSU+UsyQkbNeffVLzc6B6foA==} + engines: {node: '>=12'} + /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -1991,6 +2051,10 @@ packages: hasBin: true dev: true + /ufo/0.8.6: + resolution: {integrity: sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw==} + dev: true + /undici/5.12.0: resolution: {integrity: sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==} engines: {node: '>=12.18'} @@ -2020,17 +2084,41 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite/3.2.2: - resolution: {integrity: sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw==} + /vite-node/0.25.1_d43diowfqaqszqvwpgac3z5zra: + resolution: {integrity: sha512-eYvVxhYerXENBti7xxmDsbQoJVBUt3H3gW+odWrByu2AnrnT0Cs5NfnzipqAxGOVpjOg3iXKI4jm6swcdmH1DQ==} + engines: {node: '>=v14.16.0'} + hasBin: true + dependencies: + debug: 4.3.4_supports-color@9.2.3 + mlly: 0.5.16 + pathe: 0.2.0 + source-map: 0.6.1 + source-map-support: 0.5.21 + vite: 3.2.3_@types+node@18.11.9 + transitivePeerDependencies: + - '@types/node' + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite/3.2.3_@types+node@18.11.9: + resolution: {integrity: sha512-h8jl1TZ76eGs3o2dIBSsvXDLb1m/Ec1iej8ZMdz+PsaFUsftZeWe2CZOI3qogEsMNaywc17gu0q6cQDzh/weCQ==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: + '@types/node': '>= 14' less: '*' sass: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 peerDependenciesMeta: + '@types/node': + optional: true less: optional: true sass: @@ -2042,6 +2130,7 @@ packages: terser: optional: true dependencies: + '@types/node': 18.11.9 esbuild: 0.15.13 postcss: 8.4.18 resolve: 1.22.1 @@ -2050,8 +2139,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.24.5: - resolution: {integrity: sha512-zw6JhPUHtLILQDe5Q39b/SzoITkG+R7hcFjuthp4xsi6zpmfQPOZcHodZ+3bqoWl4EdGK/p1fuMiEwdxgbGLOA==} + /vitest/0.25.1_supports-color@9.2.3: + resolution: {integrity: sha512-eH74h6MkuEgsqR4mAQZeMK9O0PROiKY+i+1GMz/fBi5A3L2ml5U7JQs7LfPU7+uWUziZyLHagl+rkyfR8SLhlA==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -2072,17 +2161,20 @@ packages: jsdom: optional: true dependencies: - '@types/chai': 4.3.3 + '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 '@types/node': 18.11.9 - chai: 4.3.6 - debug: 4.3.4 + acorn: 8.8.1 + acorn-walk: 8.2.0 + chai: 4.3.7 + debug: 4.3.4_supports-color@9.2.3 local-pkg: 0.4.2 + source-map: 0.6.1 strip-literal: 0.4.2 tinybench: 2.3.1 tinypool: 0.3.0 tinyspy: 1.0.2 - vite: 3.2.2 + vite: 3.2.3_@types+node@18.11.9 transitivePeerDependencies: - less - sass diff --git a/scripts/download-schemas.js b/scripts/download-schemas.js deleted file mode 100644 index 9317243f9..000000000 --- a/scripts/download-schemas.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Download OpenAPI schemas - * Reference updating schemas without committing to the repo - */ - -/* eslint-disable no-undef */ - -import fs from "node:fs"; -import { URL } from "node:url"; -import { fetch } from "undici"; - -export const FIXTURES_DIR = new URL("../test/fixtures/", import.meta.url); - -const schemas = { - "github-api.yaml": - "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml", - "stripe-api.yaml": "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.yaml", -}; - -export default async function downloadSchemas() { - await Promise.all( - Object.entries(schemas).map(async ([name, url]) => { - const result = await fetch(url); - if (!result.ok) { - console.error(`✘ Error fetching ${url}`); - process.exit(1); - } - fs.writeFileSync(new URL(name, FIXTURES_DIR), await result.text()); - }) - ); -} - -downloadSchemas(); diff --git a/scripts/download-schemas.ts b/scripts/download-schemas.ts new file mode 100644 index 000000000..52274c255 --- /dev/null +++ b/scripts/download-schemas.ts @@ -0,0 +1,54 @@ +import fs from "node:fs"; +import { fileURLToPath } from "node:url"; +import degit from "degit"; +import { fetch } from "undici"; +import { error } from "../src/utils.js"; + +export const singleFile = { + "github-api": + "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml", + "github-api-next": + "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/api.github.com/api.github.com.yaml", + "stripe-api": "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.yaml", +}; +export const multiFile = { + "digital-ocean-api": { + repo: "https://github.com/digitalocean/openapi", + entry: "./specification/DigitalOcean-public.v2.yaml", + }, +}; + +const ONE_DAY = 1000 * 60 * 60 * 24; +const FIXTURES_DIR = new URL("../test/fixtures/", import.meta.url); + +export async function download() { + await Promise.all([ + ...Object.entries(singleFile).map(async ([k, url]) => { + const dest = new URL(`${k}.yaml`, FIXTURES_DIR); + if (fs.existsSync(dest)) { + const { mtime } = fs.statSync(dest); + if (Date.now() - mtime.getTime() < ONE_DAY) return; // only update every 24 hours at most + } + const result = await fetch(url); + if (!result.ok) { + error(`Error fetching ${url}`); + process.exit(1); + } + fs.mkdirSync(new URL(".", dest), { recursive: true }); + fs.writeFileSync(dest, await result.text()); + }), + ...Object.entries(multiFile).map(async ([k, meta]) => { + const dest = new URL(k, FIXTURES_DIR); + if (fs.existsSync(dest)) { + const { mtime } = fs.statSync(dest); + if (Date.now() - mtime.getTime() < ONE_DAY) return; // only update every 24 hours at most + } + const emitter = degit(meta.repo, { + force: true, + }); + await emitter.clone(fileURLToPath(new URL(k, FIXTURES_DIR))); + }), + ]); +} + +download(); diff --git a/scripts/update-examples.js b/scripts/update-examples.js deleted file mode 100644 index 0b6ec5272..000000000 --- a/scripts/update-examples.js +++ /dev/null @@ -1,21 +0,0 @@ -import { execSync } from "node:child_process"; -import fs from "node:fs"; -import { URL } from "node:url"; -import downloadSchemas, { FIXTURES_DIR } from "./download-schemas.js"; - -const EXT_RE = /\.[^.]+$/; - -async function generateSchemas() { - await downloadSchemas(); - const schemas = fs.readdirSync(FIXTURES_DIR); - await Promise.all( - schemas.map(async (filename) => { - if (!filename.endsWith(".json") && !filename.endsWith(".yaml")) return; - await execSync(`node ./bin/cli.js ./test/fixtures/${filename} -o ./examples/${filename.replace(EXT_RE, "")}.ts`, { - cwd: new URL("../", import.meta.url), - }); - }) - ); -} - -generateSchemas(); diff --git a/scripts/update-examples.ts b/scripts/update-examples.ts new file mode 100644 index 000000000..5d3e73859 --- /dev/null +++ b/scripts/update-examples.ts @@ -0,0 +1,25 @@ +import { execa } from "execa"; +import { URL } from "node:url"; +import { download, singleFile, multiFile } from "./download-schemas.js"; + +async function generateSchemas() { + await download(); + await Promise.all([ + ...Object.keys(singleFile).map(async (name) => { + await execa("node", ["./bin/cli.js", `./test/fixtures/${name}.yaml`, "-o", `./examples/${name}.ts`], { + cwd: new URL("../", import.meta.url), + }); + }), + ...Object.entries(multiFile).map(async ([name, meta]) => { + await execa( + "node", + ["./bin/cli.js", `./test/fixtures/${name}${meta.entry.substring(1)}`, "-o", `./examples/${name}.ts`], + { + cwd: new URL("../", import.meta.url), + } + ); + }), + ]); +} + +generateSchemas(); diff --git a/src/index.ts b/src/index.ts index a8791afdf..556af50d8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,15 @@ -import type { GlobalContext, OpenAPI3, OpenAPITSOptions } from "./types.js"; +import type { GlobalContext, OpenAPI3, OpenAPITSOptions, Subschema } from "./types"; import type { Readable } from "node:stream"; import { URL } from "node:url"; import load, { resolveSchema, VIRTUAL_JSON_URL } from "./load.js"; -import transformSchema from "./transform/index.js"; -import { checkOpenAPIVersion, escObjKey, indent } from "./utils.js"; +import { transformSchema } from "./transform/index.js"; +import transformMediaTypeObject from "./transform/media-type-object.js"; +import transformOperationObject from "./transform/operation-object.js"; +import transformParameterObject from "./transform/parameter-object.js"; +import transformRequestBodyObject from "./transform/request-body-object.js"; +import transformResponseObject from "./transform/response-object.js"; +import transformSchemaObject from "./transform/schema-object.js"; +import { error, escObjKey, getEntries, indent } from "./utils.js"; export * from "./types.js"; // expose all types to consumers const EMPTY_OBJECT_RE = /^\s*\{?\s*\}?\s*$/; @@ -41,6 +47,7 @@ async function openapiTS( postTransform: options && typeof options.postTransform === "function" ? options.postTransform : undefined, immutableTypes: options.immutableTypes || false, indentLv: 0, + operations: {}, pathParamsAsTypes: options.pathParamsAsTypes || false, silent: options.silent || false, supportArrayLength: options.supportArrayLength || false, @@ -50,9 +57,7 @@ async function openapiTS( const isInlineSchema = typeof schema !== "string" && schema instanceof URL == false; // 1. load schema (and subschemas) - let rootSchema = {} as OpenAPI3; - const external: { [id: string]: OpenAPI3 } = {}; - const allSchemas: { [id: string]: OpenAPI3 } = {}; + const allSchemas: { [id: string]: Subschema } = {}; const schemaURL: URL = typeof schema === "string" ? resolveSchema(schema) : (schema as URL); await load(schemaURL, { @@ -60,24 +65,24 @@ async function openapiTS( auth: options.auth, schemas: allSchemas, rootURL: isInlineSchema ? new URL(VIRTUAL_JSON_URL) : schemaURL, // if an inline schema is passed, use virtual URL + urlCache: new Set(), httpHeaders: options.httpHeaders, httpMethod: options.httpMethod, }); - // 1a. identify root schema + // 1. basic validation for (const k of Object.keys(allSchemas)) { - const rootSchemaID = isInlineSchema ? VIRTUAL_JSON_URL : schemaURL.href; - if (k === rootSchemaID) { - rootSchema = allSchemas[k]; - } else { - external[k] = allSchemas[k]; + const subschema = allSchemas[k]; + if (typeof (subschema.schema as any).swagger === "string") { + error("Swagger 2.0 and older no longer supported. Please use v5."); + process.exit(1); + } + if (subschema.hint === "OpenAPI3" && typeof subschema.schema.openapi === "string") { + if (parseInt(subschema.schema.openapi) !== 3) { + error(`Unsupported OpenAPI version "${subschema.schema.openapi}". Only 3.x is supported.`); + process.exit(1); + } } - - // 1b. make sure schema version is valid - checkOpenAPIVersion(allSchemas[k] as any); - - // 1c. garbage collect things we no longer need - delete allSchemas[k]; } // 2. generate raw output @@ -103,7 +108,7 @@ async function openapiTS( if (options.inject) output.push(options.inject); // 2d. root schema - const rootTypes = transformSchema(rootSchema, { ...ctx }); + const rootTypes = transformSchema(allSchemas["."].schema as OpenAPI3, ctx); for (const k of Object.keys(rootTypes)) { if (rootTypes[k] && !EMPTY_OBJECT_RE.test(rootTypes[k])) { output.push( @@ -113,30 +118,87 @@ async function openapiTS( } else { output.push(`export type ${k} = Record;`, ""); } + delete rootTypes[k]; + delete allSchemas["."]; // garbage collect, but also remove from next step (external) } // 2e. external schemas (subschemas) - const externalKeys = Object.keys(external); + const externalKeys = Object.keys(allSchemas); // root schema (".") should already be removed if (externalKeys.length) { + let indentLv = 0; output.push(options.exportType ? "export type external = {" : "export interface external {", ""); externalKeys.sort((a, b) => a.localeCompare(b, "en", { numeric: true })); // sort external keys because they may have resolved in a different order each time - for (const subschemaURL of externalKeys) { - output.push(indent(`${escObjKey(subschemaURL)}: {`, 1), ""); - const subschemaTypes = transformSchema(external[subschemaURL], { - ...ctx, - indentLv: 1, - subschemaID: subschemaURL, - }); - for (const k of Object.keys(subschemaTypes)) { - output.push(indent(`${escObjKey(k)}: ${subschemaTypes[k]}`, 2)); + indentLv++; + for (const subschemaID of externalKeys) { + const subschema = allSchemas[subschemaID]; + const key = escObjKey(subschemaID); + const path = `${subschemaID}#`; + let subschemaOutput = ""; + switch (subschema.hint) { + case "OpenAPI3": { + const subschemaTypes = transformSchema(subschema.schema, { ...ctx, indentLv }); + if (!Object.keys(subschemaTypes).length) break; + output.push(indent(`${key}: {`, 1), ""); + indentLv++; + for (const [k, v] of getEntries(subschemaTypes, options.alphabetize)) { + if (EMPTY_OBJECT_RE.test(v)) output.push(indent(`${escObjKey(k)}: Record;`, indentLv)); + else output.push(indent(`${escObjKey(k)}: {${v};`, indentLv), indent("};", indentLv)); + } + indentLv--; + output.push(indent("}", 1)); + break; + } + case "MediaTypeObject": { + subschemaOutput = transformMediaTypeObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + case "OperationObject": { + subschemaOutput = transformOperationObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + case "ParameterObject": { + subschemaOutput = transformParameterObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + case "RequestBodyObject": { + subschemaOutput = transformRequestBodyObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + case "ResponseObject": { + subschemaOutput = transformResponseObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + case "SchemaObject": { + subschemaOutput = transformSchemaObject(subschema.schema, { path, ctx: { ...ctx, indentLv } }); + break; + } + default: { + error(`Could not resolve subschema ${subschemaID}. Unknown type "${(subschema as any).hint}".`); + process.exit(1); + } + } + if (subschemaOutput && !EMPTY_OBJECT_RE.test(subschemaOutput)) { + output.push(indent(`${key}: ${subschemaOutput}`, indentLv)); } - output.push(indent("}", 1)); + delete allSchemas[subschemaID]; } - output.push(`}${options.exportType ? ";" : ""}`, ""); + indentLv--; + output.push(indent(`}${options.exportType ? ";" : ""}`, indentLv), ""); } else { output.push(`export type external = Record;`, ""); } + // 3. operations (only get fully built after all external schemas transformed) + if (Object.keys(ctx.operations).length) { + output.push(options.exportType ? "export type operations = {" : "export interface operations {", ""); + for (const k of Object.keys(ctx.operations)) { + output.push(indent(`${escObjKey(k)}: ${ctx.operations[k]};`, 1)); + } + output.push(`}${options.exportType ? ";" : ""}`, ""); + } else { + output.push(`export type operations = Record;`, ""); + } + return output.join("\n"); } diff --git a/src/load.ts b/src/load.ts index 951834f21..d14fab49c 100644 --- a/src/load.ts +++ b/src/load.ts @@ -1,54 +1,61 @@ -import type { DiscriminatorObject, GlobalContext, SchemaObject } from "./types"; +import type { + ComponentsObject, + GlobalContext, + OpenAPI3, + OperationObject, + PathItemObject, + ReferenceObject, + RequestBodyObject, + ResponseObject, + SchemaObject, + Subschema, +} from "./types"; import fs from "node:fs"; import path from "node:path"; import { Readable } from "node:stream"; import { URL } from "node:url"; import yaml from "js-yaml"; -import mime from "mime"; import { request, type Dispatcher } from "undici"; -import { parseRef, DOUBLE_QUOTE_RE, makeTSIndex } from "./utils.js"; +import { parseRef, error, makeTSIndex, walk, isRemoteURL, isFilepath } from "./utils.js"; -type PartialSchema = Record; // not a very accurate type, but this is easier to deal with before we know we’re dealing with a valid spec -type SchemaMap = { [url: string]: PartialSchema }; +type SchemaMap = { [id: string]: Subschema }; -const RED = "\u001b[31m"; -const RESET = "\u001b[0m"; -const HTTP_RE = /^https?:\/\//; export const VIRTUAL_JSON_URL = `file:///_json`; // fake URL reserved for dynamic JSON -function parseSchema(schema: any, type: "YAML" | "JSON"): any { - if (type === "YAML") { - try { - return yaml.load(schema); - } catch (err: any) { - throw new Error(`YAML: ${err.toString()}`); - } - } else { - try { - return JSON.parse(schema); - } catch (err: any) { - throw new Error(`JSON: ${err.toString()}`); - } +function parseYAML(schema: any): any { + try { + return yaml.load(schema); + } catch (err: any) { + error(`YAML: ${err.toString()}`); + process.exit(1); } } -function isFile(url: URL): boolean { - return url.protocol === "file:"; +function parseJSON(schema: any): any { + try { + return JSON.parse(schema); + } catch (err: any) { + error(`JSON: ${err.toString()}`); + process.exit(1); + } } -export function resolveSchema(url: string): URL { +export function resolveSchema(filename: string): URL { // option 1: remote - if (HTTP_RE.test(url)) return new URL(url); + if (isRemoteURL(filename)) return new URL(filename.startsWith("//") ? `https:${filename}` : filename); // option 2: local - const localPath = path.isAbsolute(url) ? new URL("", `file://${url}`) : new URL(url, `file://${process.cwd()}/`); // if absolute path is provided use that; otherwise search cwd\ + const localPath = path.isAbsolute(filename) + ? new URL(`file://${filename}`) + : new URL(filename, `file://${process.cwd()}/`); if (!fs.existsSync(localPath)) { - throw new Error(`Could not locate ${url}`); + error(`Could not locate ${filename}`); + process.exit(1); } else if (fs.statSync(localPath).isDirectory()) { - throw new Error(`${localPath} is a directory not a file`); + error(`${localPath} is a directory not a file`); + process.exit(1); } - return localPath; } @@ -72,10 +79,7 @@ function parseHttpHeaders(httpHeaders: Record): Record const stringVal = JSON.stringify(v); finalHeaders[k] = stringVal; } catch (err) { - /* istanbul ignore next */ - console.error( - `${RED}Cannot parse key: ${k} into JSON format. Continuing with the next HTTP header that is specified${RESET}` - ); + error(`Cannot parse key: ${k} into JSON format. Continuing with the next HTTP header that is specified`); } } } @@ -84,64 +88,39 @@ function parseHttpHeaders(httpHeaders: Record): Record } interface LoadOptions extends GlobalContext { + /** Subschemas may be any type; this helps transform correctly */ + hint?: Subschema["hint"]; auth?: string; rootURL: URL; schemas: SchemaMap; - urlCache?: Set; // URL cache (prevent URLs from being loaded over and over) + urlCache: Set; httpHeaders?: Record; httpMethod?: string; } /** Load a schema from local path or remote URL */ export default async function load( - schema: URL | PartialSchema | Readable, + schema: URL | Subschema | Readable, options: LoadOptions -): Promise<{ [url: string]: PartialSchema }> { - const urlCache = options.urlCache || new Set(); +): Promise<{ [url: string]: Subschema }> { + let schemaID = "."; - // if this is dynamically-passed-in JSON, we’ll have to change a few things - const isJSON = schema instanceof URL == false && schema instanceof Readable == false; - const schemaID = isJSON || schema instanceof Readable ? new URL(VIRTUAL_JSON_URL).href : (schema.href as string); - const schemas = options.schemas; + // 1. load contents + // 1a. URL + if (schema instanceof URL) { + const hint = options.hint || "OpenAPI3"; - // scenario 1: load schema from dynamic JSON - if (isJSON) { - schemas[schemaID] = schema; - } - // scenario 2: fetch schema from URL (local or remote) - else { - if (urlCache.has(schemaID)) return options.schemas; // exit early if this has already been scanned - urlCache.add(schemaID); // add URL to cache + // normalize ID + if (schema.href !== options.rootURL.href) schemaID = relativePath(options.rootURL, schema); - let contents = ""; - let contentType = ""; - const schemaURL = schema instanceof Readable ? new URL(VIRTUAL_JSON_URL) : (schema as URL); // helps TypeScript + if (options.urlCache.has(schemaID)) return options.schemas; // exit early if already indexed + options.urlCache.add(schemaID); - if (schema instanceof Readable) { - const readable = schema; - contents = await new Promise((resolve) => { - readable.resume(); - readable.setEncoding("utf8"); - - let content = ""; - readable.on("data", (chunk: string) => { - content += chunk; - }); + const ext = path.extname(schema.pathname).toLowerCase(); - readable.on("end", () => { - resolve(content); - }); - }); - contentType = "text/yaml"; - } else if (isFile(schemaURL)) { - // load local - contents = fs.readFileSync(schemaURL, "utf8"); - contentType = mime.getType(schemaID) || ""; - } else { - // load remote - const headers: Record = { - "User-Agent": "openapi-typescript", - }; + // remote + if (schema.protocol.startsWith("http")) { + const headers: Record = { "User-Agent": "openapi-typescript" }; if (options.auth) headers.Authorization = options.auth; // Add custom parsed HTTP headers @@ -151,173 +130,270 @@ export default async function load( headers[k] = v; } } - - const res = await request(schemaID, { method: (options.httpMethod as Dispatcher.HttpMethod) || "GET", headers }); - if (Array.isArray(res.headers["Content-Type"])) contentType = res.headers["Content-Type"][0]; - else if (res.headers["Content-Type"]) contentType = res.headers["Content-Type"]; - contents = await res.body.text(); - } - - const isYAML = contentType === "application/openapi+yaml" || contentType === "text/yaml"; - const isJSON = - contentType === "application/json" || - contentType === "application/json5" || - contentType === "application/openapi+json"; - if (isYAML) { - schemas[schemaID] = parseSchema(contents, "YAML"); - } else if (isJSON) { - schemas[schemaID] = parseSchema(contents, "JSON"); - } else { - // if contentType is unknown, guess - try { - schemas[schemaID] = parseSchema(contents, "JSON"); - } catch (err1) { - try { - schemas[schemaID] = parseSchema(contents, "YAML"); - } catch (err2) { - throw new Error(`Unknown format${contentType ? `: "${contentType}"` : ""}. Only YAML or JSON supported.`); // give up: unknown type - } + const res = await request(schema, { method: (options.httpMethod as Dispatcher.HttpMethod) || "GET", headers }); + const contentType = Array.isArray(res.headers["Content-Type"]) + ? res.headers["Content-Type"][0] + : res.headers["Content-Type"]; + if (ext === ".json" || (contentType && contentType.includes("json"))) { + options.schemas[schemaID] = { + hint, + schema: parseJSON(await res.body.text()), + }; + } else if (ext === ".yaml" || ext === ".yml" || (contentType && contentType.includes("yaml"))) { + options.schemas[schemaID] = { + hint, + schema: parseYAML(await res.body.text()), + }; } } + // local file + else { + const contents = fs.readFileSync(schema, "utf8"); + if (ext === ".yaml" || ext === ".yml") + options.schemas[schemaID] = { + hint, + schema: parseYAML(contents), + }; + else if (ext === ".json") + options.schemas[schemaID] = { + hint, + schema: parseJSON(contents), + }; + } + } + // 1b. Readable stream + else if (schema instanceof Readable) { + const readable = schema; + const contents = await new Promise((resolve) => { + readable.resume(); + readable.setEncoding("utf8"); + let content = ""; + readable.on("data", (chunk: string) => { + content += chunk; + }); + readable.on("end", () => { + resolve(content.trim()); + }); + }); + // if file starts with '{' assume JSON + options.schemas[schemaID] = { + hint: "OpenAPI3", + schema: contents.charAt(0) === "{" ? parseJSON(contents) : parseYAML(contents), + }; + } + // 1c. inline + else if (typeof schema === "object") { + options.schemas[schemaID] = { + hint: "OpenAPI3", + schema: schema as any, + }; + } + // 1d. failsafe + else { + error(`Invalid schema`); + process.exit(1); } - // schemas key double quote replace - schemas[schemaID] = replaceKeys(schemas[schemaID]); - - // scan $refs, but don’t transform (load everything in parallel) + // 2. resolve $refs const refPromises: Promise[] = []; - schemas[schemaID] = JSON.parse(JSON.stringify(schemas[schemaID]), (k, v) => { - if (k !== "$ref" || typeof v !== "string") return v; + walk(options.schemas[schemaID].schema, (rawNode, nodePath) => { + // filter custom properties from allOf, anyOf, oneOf + for (const k of ["allOf", "anyOf", "oneOf"]) { + if (Array.isArray(rawNode[k])) { + rawNode[k] = (rawNode as any)[k].filter((o: SchemaObject | ReferenceObject) => { + if (!("$ref" in o)) return true; + const ref = parseRef(o.$ref); + return !ref.path.some((i) => i.startsWith("x-")); // ignore all custom "x-*" properties + }); + } + } - const { url: refURL } = parseRef(v); - if (refURL) { - // load $refs (only if new) and merge subschemas with top-level schema - const isRemoteURL = refURL.startsWith("http://") || refURL.startsWith("https://"); + if (!("$ref" in rawNode)) return; + const node = rawNode as unknown as ReferenceObject; - // if this is dynamic JSON, we have no idea how to resolve relative URLs, so throw here - if (isJSON && !isRemoteURL) { - throw new Error(`Can’t load URL "${refURL}" from dynamic JSON. Load this schema from a URL instead.`); - } + const ref = parseRef(node.$ref); + if (ref.filename === ".") return; // local $ref; ignore + // $ref with custom "x-*" property + if (ref.path.some((i) => i.startsWith("x-"))) { + delete (node as any).$ref; + return; + } - const nextURL = isRemoteURL ? new URL(refURL) : new URL(refURL, schema as URL); - refPromises.push( - load(nextURL, { ...options, urlCache }).then((subschemas) => { - for (const subschemaURL of Object.keys(subschemas)) { - schemas[subschemaURL] = subschemas[subschemaURL]; - } - }) - ); - return v.replace(refURL, nextURL.href); // resolve relative URLs to absolute URLs so the schema can be flattened + // hints help external schemas pick up where the root left off + const hint = getHint([...nodePath, ...ref.path], options.hint); + + // if root schema is remote and this is a relative reference, treat as remote + if (schema instanceof URL) { + const nextURL = new URL(ref.filename, schema); + const nextID = relativePath(schema, nextURL); + if (options.urlCache.has(nextID)) return; + refPromises.push(load(nextURL, { ...options, hint })); + node.$ref = node.$ref.replace(ref.filename, nextID); + return; + } + // otherwise, if $ref is remote use that + if (isRemoteURL(ref.filename) || isFilepath(ref.filename)) { + const nextURL = new URL(ref.filename.startsWith("//") ? `https://${ref.filename}` : ref.filename); + if (options.urlCache.has(nextURL.href)) return; + refPromises.push(load(nextURL, { ...options, hint })); + node.$ref = node.$ref.replace(ref.filename, nextURL.href); + return; + } + // if this is dynamic JSON, we have no idea how to resolve external URLs, so throw here + if (options.rootURL.href === VIRTUAL_JSON_URL) { + error(`Can’t resolve "${ref.filename}" from dynamic JSON. Load this schema from a URL instead.`); + process.exit(1); } - return v; + error(`Can’t resolve "${ref.filename}"`); + process.exit(1); }); await Promise.all(refPromises); - // transform $refs once, at the root schema, after all have been scanned & downloaded (much easier to do here when we have the context) - if (schemaID === options.rootURL.href) { - for (const subschemaURL of Object.keys(schemas)) { - // transform $refs in schema - schemas[subschemaURL] = JSON.parse(JSON.stringify(schemas[subschemaURL]), (k, v) => { - if (k !== "$ref" || typeof v !== "string") return v; - if (!v.includes("#")) return v; // already transformed; skip + // 3. transform $refs once, at the root schema, after all have been scanned & downloaded (much easier to do here when we have the context) + if (schemaID === ".") { + for (const subschemaID of Object.keys(options.schemas)) { + walk(options.schemas[subschemaID].schema, (rawNode) => { + if (!("$ref" in rawNode)) return; + const node = rawNode as unknown as ReferenceObject; - const { url, parts } = parseRef(v); - // scenario 1: resolve all external URLs so long as they don’t point back to root schema - if (url && new URL(url).href !== options.rootURL.href) { - const relativeURL = - isFile(new URL(url)) && isFile(options.rootURL) - ? path.posix.relative(path.posix.dirname(options.rootURL.href), url) - : url; - return `external["${relativeURL}"]["${parts.join('"]["')}"]`; // export external ref - } - // scenario 2: treat all $refs in external schemas as external - if (!url && subschemaURL !== options.rootURL.href) { - const relativeURL = - isFile(new URL(subschemaURL)) && isFile(options.rootURL) - ? path.posix.relative(path.posix.dirname(options.rootURL.href), subschemaURL) - : subschemaURL; - return `external["${relativeURL}"]["${parts.join('"]["')}"]`; // export external ref - } + const ref = parseRef(node.$ref); - // References to properties of schemas like `#/components/schemas/Pet/properties/name` - // requires the components to be wrapped in a `properties` object. But to keep - // backwards compatibility we should instead just remove the `properties` part. - // For us to recognize the `properties` part it simply has to be the second last. - const propertiesI = parts.indexOf("properties"); - if (propertiesI > 0 && propertiesI !== parts.length - 1) { - parts.splice(propertiesI, 1); + // local $ref: convert into TS path + if (ref.filename === ".") { + node.$ref = makeTSIndex(ref.path); } - - // scenario 3: transform all $refs pointing back to root schema - const [base, ...rest] = parts; - - return `${base}["${rest.join('"]["')}"]`; // transform other $refs to the root schema (including external refs that point back to the root schema) - }); - - // use relative keys for external schemas (schemas generated on different machines should have the same namespace) - if (subschemaURL !== options.rootURL.href) { - const relativeURL = - isFile(new URL(subschemaURL)) && isFile(options.rootURL) - ? path.posix.relative(path.posix.dirname(options.rootURL.href), subschemaURL) - : subschemaURL; - if (relativeURL !== subschemaURL) { - schemas[relativeURL] = schemas[subschemaURL]; - delete schemas[subschemaURL]; + // external $ref + else { + const refURL = new URL(ref.filename, new URL(subschemaID, options.rootURL)); + node.$ref = makeTSIndex(["external", relativePath(options.rootURL, refURL), ...ref.path]); } - } + }); } } - // scan for discriminators - for (const k of Object.keys(schemas)) { - // lazy stringification check is much faster than always crawling for discriminators, - // and since most schemas don’t use them, this saves a decent amount of work (and - // is fast enough that schemas that do aren’t significantly impacted) - if (JSON.stringify(schemas[k]).includes("discriminator")) { - for (const [id, discriminator] of Object.entries( - getDiscriminators(schemas[k], k === options.rootURL.href ? [] : ["external", "k"]) - )) { - options.discriminators[id] = discriminator; - } + // 4. scan for discriminators (after everything’s resolved in one file) + for (const k of Object.keys(options.schemas)) { + // 4a. lazy stringification check is faster than deep-scanning a giant object for discriminators + // since most schemas don’t use them + if (JSON.stringify(options.schemas[k].schema).includes('"discriminator"')) { + walk(options.schemas[k].schema, (rawNode, nodePath) => { + const node = rawNode as unknown as SchemaObject; + if (!node.discriminator) return; + options.discriminators[schemaID === "." ? makeTSIndex(nodePath) : makeTSIndex(["external", k, ...nodePath])] = + node.discriminator; + }); } } - return schemas; + return options.schemas; } -/** (internal) res */ -export function replaceKeys(obj: Record): Record { - if (typeof obj === "object" && obj !== undefined && obj !== null) { - if (Array.isArray(obj)) { - return obj.map((item) => replaceKeys(item)); - } else { - const keyValues: Record = {}; - for (const key of Object.keys(obj)) { - const newKey = key.replace(DOUBLE_QUOTE_RE, '\\"'); - const newValue = obj[key]; - keyValues[newKey] = replaceKeys(newValue); - } - return keyValues; - } - } else { - return obj; +/** relative path from 2 URLs */ +function relativePath(src: URL, dest: URL): string { + const isSameOrigin = + dest.protocol.startsWith("http") && src.protocol.startsWith("http") && dest.origin === src.origin; + const isSameDisk = dest.protocol === "file:" && src.protocol === "file:"; + if (isSameOrigin || isSameDisk) { + return path.posix.relative(path.posix.dirname(src.pathname), dest.pathname); } + return dest.href; } -/** Scan any object for discriminators */ -function getDiscriminators(schema: Record, root: string[] = []): Record { - const discriminators: Record = {}; - - /** crawl an object top-to-bottom, building path along the way */ - function crawlObj(obj: unknown, path: string[] = root): void { - if (!obj || typeof obj !== "object" || Array.isArray(obj)) return; - if ("discriminator" in obj) - discriminators[makeTSIndex(path)] = (obj as SchemaObject).discriminator as DiscriminatorObject; - for (const [k, v] of Object.entries(obj)) { - crawlObj(v, path.concat(k)); +/** given a path array (an array of indices), what type of object is this? */ +export function getHint(path: (string | number)[], startFrom?: Subschema["hint"]): Subschema["hint"] | undefined { + if (startFrom && startFrom !== "OpenAPI3") { + switch (startFrom) { + case "OperationObject": + return getHintFromOperationObject(path); + case "RequestBodyObject": + return getHintFromRequestBodyObject(path); + case "ResponseObject": + return getHintFromResponseObject(path); + default: + return startFrom; } } - crawlObj(schema); - - return discriminators; + switch (path[0] as keyof OpenAPI3) { + case "paths": + return getHintFromPathItemObject(path.slice(2)); // skip URL at [1] + case "components": + return getHintFromComponentsObject(path.slice(1)); + } + return undefined; +} +function getHintFromComponentsObject(path: (string | number)[]): Subschema["hint"] | undefined { + switch (path[0] as keyof ComponentsObject) { + case "schemas": + case "headers": + return getHintFromSchemaObject(path.slice(2)); + case "parameters": + return getHintFromParameterObject(path.slice(2)); + case "responses": + return getHintFromResponseObject(path.slice(2)); + case "requestBodies": + return getHintFromRequestBodyObject(path.slice(2)); + case "pathItems": + return getHintFromPathItemObject(path.slice(2)); + } + return "SchemaObject"; +} +function getHintFromMediaTypeObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0]) { + case "schema": + return getHintFromSchemaObject(path.slice(1)); + } + return "MediaTypeObject"; +} +function getHintFromOperationObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0] as keyof OperationObject) { + case "parameters": + return getHintFromParameterObject(path.slice(1)); + case "requestBody": + return getHintFromRequestBodyObject(path.slice(1)); + case "responses": + return getHintFromResponseObject(path.slice(2)); // skip the response code at [1] + } + return "OperationObject"; +} +function getHintFromParameterObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0]) { + case "content": + return getHintFromMediaTypeObject(path.slice(2)); // skip content type at [1] + case "schema": + return getHintFromSchemaObject(path.slice(1)); + } + return "ParameterObject"; +} +function getHintFromPathItemObject(path: (string | number)[]): Subschema["hint"] | undefined { + switch (path[0] as keyof PathItemObject) { + case "parameters": + return getHintFromParameterObject(path.slice(1)); + default: + return getHintFromOperationObject(path.slice(1)); + } +} +function getHintFromRequestBodyObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0] as keyof RequestBodyObject) { + case "content": + return getHintFromMediaTypeObject(path.slice(2)); // skip content type at [1] + } + return "RequestBodyObject"; +} +function getHintFromResponseObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0] as keyof ResponseObject) { + case "headers": + return getHintFromSchemaObject(path.slice(2)); // skip name at [1] + case "content": + return getHintFromMediaTypeObject(path.slice(2)); // skip content type at [1] + } + return "ResponseObject"; +} +function getHintFromSchemaObject(path: (string | number)[]): Subschema["hint"] { + switch (path[0]) { + case "allOf": + case "anyOf": + case "oneOf": + return getHintFromSchemaObject(path.slice(2)); // skip array index at [1] + } + return "SchemaObject"; } diff --git a/src/transform/components-object.ts b/src/transform/components-object.ts index c1c9c309e..72c0cb206 100644 --- a/src/transform/components-object.ts +++ b/src/transform/components-object.ts @@ -1,5 +1,5 @@ import type { ComponentsObject, GlobalContext } from "../types"; -import { escObjKey, getEntries, getSchemaObjectComment, indent, tsReadonly } from "../utils.js"; +import { escObjKey, getEntries, getSchemaObjectComment, indent, tsOptionalProperty, tsReadonly } from "../utils.js"; import transformHeaderObject from "./header-object.js"; import transformParameterObject from "./parameter-object.js"; import transformPathItemObject from "./path-item-object.js"; @@ -7,15 +7,7 @@ import transformRequestBodyObject from "./request-body-object.js"; import transformResponseObject from "./response-object.js"; import transformSchemaObject from "./schema-object.js"; -export interface TransformComponentsObjectOptions { - operations: Record; - ctx: GlobalContext; -} - -export default function transformComponentsObject( - components: ComponentsObject, - { operations, ctx }: TransformComponentsObjectOptions -): string { +export default function transformComponentsObject(components: ComponentsObject, ctx: GlobalContext): string { let { indentLv } = ctx; const output: string[] = ["{"]; indentLv++; @@ -109,8 +101,8 @@ export default function transformComponentsObject( const c = getSchemaObjectComment(requestBodyObject, indentLv); if (c) output.push(indent(c, indentLv)); let key = escObjKey(name); - if (ctx.immutableTypes) key = tsReadonly(key); if ("$ref" in requestBodyObject) { + if (ctx.immutableTypes) key = tsReadonly(key); output.push( indent( `${key}: ${transformSchemaObject(requestBodyObject, { @@ -121,6 +113,8 @@ export default function transformComponentsObject( ) ); } else { + if (!requestBodyObject.required) key = tsOptionalProperty(key); + if (ctx.immutableTypes) key = tsReadonly(key); const requestBodyType = transformRequestBodyObject(requestBodyObject, { path: `#/components/requestBodies/${name}`, ctx: { ...ctx, indentLv }, @@ -184,7 +178,6 @@ export default function transformComponentsObject( output.push( indent( `${key}: ${transformPathItemObject(pathItemObject, { - operations, path: `#/components/pathItems/${name}`, ctx: { ...ctx, indentLv }, })};`, diff --git a/src/transform/index.ts b/src/transform/index.ts index 131953f18..499bd7ab4 100644 --- a/src/transform/index.ts +++ b/src/transform/index.ts @@ -1,30 +1,20 @@ -import type { GlobalContext, OpenAPI3 } from "types"; -import { escStr, getEntries, indent } from "../utils.js"; +import type { GlobalContext, OpenAPI3 } from "../types"; import transformComponentsObject from "./components-object.js"; import transformPathsObject from "./paths-object.js"; -export default function transform(schema: OpenAPI3, ctx: GlobalContext): Record { +/** transform top-level schema */ +export function transformSchema(schema: OpenAPI3, ctx: GlobalContext): Record { + if (!schema) return {}; + const output: Record = {}; - let { indentLv } = ctx; - const operations: Record = {}; // paths - if (schema.paths) output.paths = transformPathsObject(schema.paths, { operations, ctx }); + if (schema.paths) output.paths = transformPathsObject(schema.paths, ctx); else output.paths = ""; // components - if (schema.components) output.components = transformComponentsObject(schema.components, { operations, ctx }); + if (schema.components) output.components = transformComponentsObject(schema.components, ctx); else output.components = ""; - // operations - const operationsOutput: string[] = ["{"]; - indentLv++; - for (const [id, operationObject] of getEntries(operations, ctx.alphabetize)) { - operationsOutput.push(indent(`${escStr(id)}: ${operationObject};`, indentLv)); - } - indentLv--; - operationsOutput.push(indent("}", indentLv)); - output.operations = operationsOutput.join("\n"); - return output; } diff --git a/src/transform/link-object.ts b/src/transform/link-object.ts deleted file mode 100644 index 8fa0378c5..000000000 --- a/src/transform/link-object.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { GlobalContext, LinkObject } from "../types"; -import { escStr } from "../utils.js"; - -export default function transformLinkObject(linkObject: LinkObject, ctx: GlobalContext): string { - if (linkObject.operationRef) return linkObject.operationRef; - if (linkObject.operationId) return `operations[${escStr(linkObject.operationId)}]`; - return ""; -} diff --git a/src/transform/operation-object.ts b/src/transform/operation-object.ts index 625e289b9..44da03688 100644 --- a/src/transform/operation-object.ts +++ b/src/transform/operation-object.ts @@ -56,7 +56,10 @@ export default function transformOperationObject( } const c = getSchemaObjectComment(p, indentLv); if (c) parameterOutput.push(indent(c, indentLv)); - const parameterType = transformParameterObject(p, { path, ctx: { ...ctx, indentLv } }); + const parameterType = transformParameterObject(p, { + path: `${path}/parameters/${p.name}`, + ctx: { ...ctx, indentLv }, + }); inlineOutput.push(indent(`${key}: ${parameterType};`, indentLv)); } // handle $ref’d params @@ -130,12 +133,18 @@ export default function transformOperationObject( if ("$ref" in responseObject) { output.push( indent( - `${responseCode}: ${transformSchemaObject(responseObject, { path: `${path}/${responseCode}`, ctx })};`, + `${responseCode}: ${transformSchemaObject(responseObject, { + path: `${path}/responses/${responseCode}`, + ctx, + })};`, indentLv ) ); } else { - const responseType = transformResponseObject(responseObject, { path, ctx: { ...ctx, indentLv } }); + const responseType = transformResponseObject(responseObject, { + path: `${path}/responses/${responseCode}`, + ctx: { ...ctx, indentLv }, + }); output.push(indent(`${responseCode}: ${responseType};`, indentLv)); } } diff --git a/src/transform/path-item-object.ts b/src/transform/path-item-object.ts index 4aecdd0eb..45692adb5 100644 --- a/src/transform/path-item-object.ts +++ b/src/transform/path-item-object.ts @@ -3,7 +3,6 @@ import { escStr, getSchemaObjectComment, indent } from "../utils.js"; import transformOperationObject from "./operation-object.js"; export interface TransformPathItemObjectOptions { - operations: Record; path: string; ctx: GlobalContext; } @@ -14,7 +13,7 @@ const UNWRAP_OBJ_RE = /^\s*{\s*([^.]+)\s*}\s*$/; export default function transformPathItemObject( pathItem: PathItemObject, - { operations, path, ctx }: TransformPathItemObjectOptions + { path, ctx }: TransformPathItemObjectOptions ): string { let { indentLv } = ctx; const output: string[] = []; @@ -27,10 +26,13 @@ export default function transformPathItemObject( if (!operationObject) continue; const c = getSchemaObjectComment(operationObject, indentLv); if (c) output.push(indent(c, indentLv)); + if ("$ref" in operationObject) { + output.push(indent(`${method}: ${operationObject.$ref}`, indentLv)); + } // if operationId exists, move into an `operations` export and pass the reference in here - if (operationObject.operationId) { + else if (operationObject.operationId) { const operationType = transformOperationObject(operationObject, { path, ctx: { ...ctx, indentLv: 1 } }); - operations[operationObject.operationId] = operationType; + ctx.operations[operationObject.operationId] = operationType; output.push(indent(`${method}: operations[${escStr(operationObject.operationId)}];`, indentLv)); } else { const operationType = transformOperationObject(operationObject, { path, ctx: { ...ctx, indentLv } }); diff --git a/src/transform/paths-object.ts b/src/transform/paths-object.ts index ebfe7cfb3..0d0f3f171 100644 --- a/src/transform/paths-object.ts +++ b/src/transform/paths-object.ts @@ -3,15 +3,7 @@ import { escStr, getEntries, indent } from "../utils.js"; import transformParameterObject from "./parameter-object.js"; import transformPathItemObject from "./path-item-object.js"; -export interface TransformPathsObjectOptions { - operations: Record; - ctx: GlobalContext; -} - -export default function transformPathsObject( - pathsObject: PathsObject, - { operations, ctx }: TransformPathsObjectOptions -): string { +export default function transformPathsObject(pathsObject: PathsObject, ctx: GlobalContext): string { let { indentLv } = ctx; const output: string[] = ["{"]; indentLv++; @@ -34,7 +26,6 @@ export default function transformPathsObject( output.push( indent( `${path}: ${transformPathItemObject(pathItemObject, { - operations, path: `#/paths/${url}`, ctx: { ...ctx, indentLv }, })};`, diff --git a/src/transform/request-body-object.ts b/src/transform/request-body-object.ts index 92d877ae4..bdd3c4582 100644 --- a/src/transform/request-body-object.ts +++ b/src/transform/request-body-object.ts @@ -12,10 +12,12 @@ export default function transformRequestBodyObject( requestBodyObject: RequestBodyObject, { path, ctx }: TransformRequestBodyObjectOptions ): string { - if (!Object.keys(requestBodyObject.content).length) return `${escStr("*/*")}: null`; let { indentLv } = ctx; const output: string[] = ["{"]; indentLv++; + output.push(indent(ctx.immutableTypes ? tsReadonly("content: {") : "content: {", indentLv)); + if (!Object.keys(requestBodyObject.content).length) return `${escStr("*/*")}: never`; + indentLv++; for (const [contentType, mediaTypeObject] of getEntries(requestBodyObject.content, ctx.alphabetize)) { const c = getSchemaObjectComment(mediaTypeObject, indentLv); if (c) output.push(indent(c, indentLv)); @@ -40,6 +42,8 @@ export default function transformRequestBodyObject( } } indentLv--; + output.push(indent("};", indentLv)); + indentLv--; output.push(indent("}", indentLv)); return output.join("\n"); } diff --git a/src/transform/response-object.ts b/src/transform/response-object.ts index 78cd320f8..d260680c1 100644 --- a/src/transform/response-object.ts +++ b/src/transform/response-object.ts @@ -1,6 +1,5 @@ import type { GlobalContext, ResponseObject } from "../types"; import { - comment, escObjKey, escStr, getEntries, @@ -10,7 +9,6 @@ import { tsReadonly, } from "../utils.js"; import transformHeaderObject from "./header-object.js"; -import transformLinkObject from "./link-object.js"; import transformMediaTypeObject from "./media-type-object.js"; export interface TransformResponseObjectOptions { @@ -70,7 +68,10 @@ export default function transformResponseObject( if (ctx.immutableTypes) key = tsReadonly(key); output.push( indent( - `${key}: ${transformMediaTypeObject(mediaTypeObject, { path: "", ctx: { ...ctx, indentLv: indentLv } })};`, + `${key}: ${transformMediaTypeObject(mediaTypeObject, { + path: `${path}/content/${contentType}`, + ctx: { ...ctx, indentLv: indentLv }, + })};`, indentLv ) ); @@ -80,28 +81,6 @@ export default function transformResponseObject( indentLv--; } - // links - if (responseObject.links) { - indentLv++; - output.push(indent("links: {", indentLv)); - indentLv++; - for (const [name, linkObject] of getEntries(responseObject.links, ctx.alphabetize)) { - const c = getSchemaObjectComment(linkObject, indentLv); - if (c) output.push(indent(c, indentLv)); - let key = escObjKey(name); - if (ctx.immutableTypes) key = tsReadonly(key); - if ("$ref" in linkObject) { - output.push(indent(`${key}: ${linkObject.$ref};`, indentLv)); - } else { - if (linkObject.description) output.push(indent(comment(linkObject.description), indentLv)); - output.push(indent(`${key}: ${transformLinkObject(linkObject, { ...ctx, indentLv })};`, indentLv)); - } - } - indentLv--; - output.push(indent("};", indentLv)); - indentLv--; - } - output.push(indent("}", indentLv)); return output.join("\n"); } diff --git a/src/transform/schema-object.ts b/src/transform/schema-object.ts index 33684ec2a..9f18bb042 100644 --- a/src/transform/schema-object.ts +++ b/src/transform/schema-object.ts @@ -44,7 +44,10 @@ export function defaultSchemaObjectTransform( // const fallback (primitives) return passed value if (!schemaObject || typeof schemaObject !== "object") return schemaObject; // const fallback (array) return tuple - if (Array.isArray(schemaObject)) return tsTupleOf(...schemaObject); + if (Array.isArray(schemaObject)) { + const finalType = tsTupleOf(...schemaObject); + return ctx.immutableTypes ? tsReadonly(finalType) : finalType; + } // $ref if ("$ref" in schemaObject) { @@ -69,13 +72,20 @@ export function defaultSchemaObjectTransform( if (schemaObject.enum) { let items = schemaObject.enum as any[]; if ("type" in schemaObject) { - if (schemaObject.type === "string") items = items.map((t) => escStr(t || "")); // empty/missing values are empty strings + if (schemaObject.type === "string" || (Array.isArray(schemaObject.type) && schemaObject.type.includes("string"))) + items = items.map((t) => escStr(t || "")); // empty/missing values are empty strings } // if no type, assume "string" else { items = items.map((t) => escStr(t || "")); } - return tsUnionOf(...items); + return tsUnionOf( + ...items, + ...(schemaObject.nullable || + ("type" in schemaObject && Array.isArray(schemaObject.type) && schemaObject.type.includes("null")) + ? ["null"] + : []) + ); } // oneOf (no discriminator) @@ -175,7 +185,7 @@ export function defaultSchemaObjectTransform( ); if (discriminatorRef) { const discriminator = ctx.discriminators[discriminatorRef.$ref]; - let value = parseRef(path).parts.pop() as string; + let value = parseRef(path).path.pop() as string; if (discriminator.mapping) { const matchedValue = Object.entries(discriminator.mapping).find(([_, v]) => v === value); if (matchedValue) value = matchedValue[0]; // why was this designed backwards!? @@ -190,12 +200,16 @@ export function defaultSchemaObjectTransform( /** collect oneOf/allOf/anyOf with Omit<> for discriminators */ function collectCompositions(items: (SchemaObject | ReferenceObject)[]): string[] { - return items.map((item) => { + const output: string[] = []; + for (const item of items) { const itemType = transformSchemaObject(item, { path, ctx: { ...ctx, indentLv } }); - if ("$ref" in item && ctx.discriminators[item.$ref]) - return tsOmit(itemType, [ctx.discriminators[item.$ref].propertyName]); - return itemType; - }); + if ("$ref" in item && ctx.discriminators[item.$ref]) { + output.push(tsOmit(itemType, [ctx.discriminators[item.$ref].propertyName])); + continue; + } + output.push(itemType); + } + return output; } // oneOf (discriminator) if ("oneOf" in schemaObject && Array.isArray(schemaObject.oneOf)) { diff --git a/src/types.ts b/src/types.ts index 53eedf106..d0a255a36 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,11 +1,15 @@ import type { URL } from "node:url"; import type { TransformSchemaObjectOptions } from "./transform/schema-object"; +export interface Extensable { + [key: `x-${string}`]: any; +} + /** * [4.8] Schema * @see https://spec.openapis.org/oas/v3.1.0#schema */ -export interface OpenAPI3 { +export interface OpenAPI3 extends Extensable { /** REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string. */ openapi: string; /** REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required. */ @@ -32,7 +36,7 @@ export interface OpenAPI3 { * [4.8.2] Info Object * The object provides metadata about the API. */ -export interface InfoObject { +export interface InfoObject extends Extensable { /** REQUIRED. The title of the API. */ title: string; /** A short summary of the API. */ @@ -53,7 +57,7 @@ export interface InfoObject { * [4.8.3] Contact Object * Contact information for the exposed API. */ -export interface ContactObject { +export interface ContactObject extends Extensable { /** The identifying name of the contact person/organization. */ name?: string; /** The URL pointing to the contact information. This MUST be in the form of a URL. */ @@ -66,7 +70,7 @@ export interface ContactObject { * [4.8.4] License object * License information for the exposed API. */ -export interface LicenseObject { +export interface LicenseObject extends Extensable { /** REQUIRED. The license name used for the API. */ name: string; /** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */ @@ -79,7 +83,7 @@ export interface LicenseObject { * [4.8.5] Server Object * An object representing a Server. */ -export interface ServerObject { +export interface ServerObject extends Extensable { /** REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}. */ url: string; /** An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation. */ @@ -92,7 +96,7 @@ export interface ServerObject { * [4.8.6] Server Variable Object * An object representing a Server Variable for server URL template substitution. */ -export interface ServerVariableObject { +export interface ServerVariableObject extends Extensable { /** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */ enum?: string[]; /** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values. */ @@ -105,7 +109,7 @@ export interface ServerVariableObject { * [4.8.7] Components Object * Holds a set of reusable objects for different aspects of the OAS. */ -export interface ComponentsObject { +export interface ComponentsObject extends Extensable { /** An object to hold reusable Schema Objects.*/ schemas?: Record; /** An object to hold reusable Response Objects. */ @@ -138,23 +142,23 @@ export type PathsObject = { [pathname: string]: PathItemObject }; * [4.8.9] Path Item Object * Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. */ -export interface PathItemObject { +export interface PathItemObject extends Extensable { /** A definition of a GET operation on this path. */ - get?: OperationObject; + get?: OperationObject | ReferenceObject; /** A definition of a PUT operation on this path. */ - put?: OperationObject; + put?: OperationObject | ReferenceObject; /** A definition of a POST operation on this path. */ - post?: OperationObject; + post?: OperationObject | ReferenceObject; /** A definition of a DELETE operation on this path. */ - delete?: OperationObject; + delete?: OperationObject | ReferenceObject; /** A definition of a OPTIONS operation on this path. */ - options?: OperationObject; + options?: OperationObject | ReferenceObject; /** A definition of a HEAD operation on this path. */ - head?: OperationObject; + head?: OperationObject | ReferenceObject; /** A definition of a PATCH operation on this path. */ - patch?: OperationObject; + patch?: OperationObject | ReferenceObject; /** A definition of a TRACE operation on this path. */ - trace?: OperationObject; + trace?: OperationObject | ReferenceObject; /** An alternative server array to service all operations in this path. */ servers?: ServerObject[]; /** A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters. */ @@ -165,7 +169,7 @@ export interface PathItemObject { * [4.8.10] Operation Object * Describes a single API operation on a path. */ -export interface OperationObject { +export interface OperationObject extends Extensable { /** A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. */ tags?: string[]; /** A short summary of what the operation does. */ @@ -196,7 +200,7 @@ export interface OperationObject { * [4.8.11] External Documentation Object * Allows referencing an external resource for extended documentation. */ -export interface ExternalDocumentationObject { +export interface ExternalDocumentationObject extends Extensable { /** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */ description?: string; /** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */ @@ -208,7 +212,7 @@ export interface ExternalDocumentationObject { * Describes a single operation parameter. * A unique parameter is defined by a combination of a name and location. */ -export interface ParameterObject { +export interface ParameterObject extends Extensable { /** * REQUIRED. The name of the parameter. Parameter names are case sensitive. * @@ -247,7 +251,7 @@ export interface ParameterObject { * [4.8.13] Request Body Object * Describes a single request body. */ -export interface RequestBodyObject { +export interface RequestBodyObject extends Extensable { /** A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */ description?: string; /** REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text */ @@ -259,7 +263,7 @@ export interface RequestBodyObject { /** * [4.8.14] Media Type Object */ -export interface MediaTypeObject { +export interface MediaTypeObject extends Extensable { /** The schema defining the content of the request, response, or parameter. */ schema?: SchemaObject; /** Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. */ @@ -274,7 +278,7 @@ export interface MediaTypeObject { * [4.8.15] Encoding Object * A single encoding definition applied to a single schema property. */ -export interface EncodingObject { +export interface EncodingObject extends Extensable { /** The Content-Type for encoding a specific property. Default value depends on the property type: for object - application/json; for array – the default is defined based on the inner type; for all other cases the default is application/octet-stream. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types. */ contentType?: string; /** A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart. */ @@ -302,7 +306,7 @@ export type ResponsesObject = { * [4.8.17] Response Object * Describes a single response from an API Operation, including design-time, static links to operations based on the response. */ -export interface ResponseObject { +export interface ResponseObject extends Extensable { /** REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation. */ description: string; /** Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored. */ @@ -322,7 +326,7 @@ export type CallbackObject = Record; /** * [4.8.19[ Example Object */ -export interface ExampleObject { +export interface ExampleObject extends Extensable { /** Short description for the example. */ summary?: string; /** Long description for the example. CommonMark syntax MAY be used for rich text representation. */ @@ -337,15 +341,15 @@ export interface ExampleObject { * [4.8.20] Link Object * The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller’s ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. */ -export interface LinkObject { +export interface LinkObject extends Extensable { /** A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI definition. See the rules for resolving Relative References. */ operationRef?: string; /** The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. */ operationId?: string; /** A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the parameter location [{in}.]{name} for operations that use the same parameter name in different locations (e.g. path.id). */ - parameters?: { [name: string]: any }; + parameters?: { [name: string]: `$${string}` }; /** A literal value or {expression} to use as a request body when calling the target operation. */ - requestBody?: any; + requestBody?: `$${string}`; /** A description of the link. CommonMark syntax MAY be used for rich text representation. */ description?: string; /** A server object to be used by the target operation. */ @@ -366,7 +370,7 @@ export type HeaderObject = Omit; * [4.8.22] Tag Object * Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. */ -export interface TagObject { +export interface TagObject extends Extensable { /** REQUIRED. The name of the tag. */ name: string; /** A description for the tag. CommonMark syntax MAY be used for rich text representation. */ @@ -379,7 +383,7 @@ export interface TagObject { * [4.8.23] Reference Object * A simple object to allow referencing other components in the OpenAPI document, internally and externally. The $ref string value contains a URI [RFC3986], which identifies the location of the value being referenced. See the rules for resolving Relative References. */ -export interface ReferenceObject { +export interface ReferenceObject extends Extensable { /** REQUIRED. The reference identifier. This MUST be in the form of a URI. */ $ref: string; /** A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect. */ @@ -414,6 +418,7 @@ export type SchemaObject = { format?: string; /** @deprecated in 3.1 (still valid for 3.0) */ nullable?: boolean; + [key: `x-${string}`]: any; } & ( | { oneOf: (SchemaObject | ReferenceObject)[] } | { type: ("string" | "number" | "integer" | "array" | "boolean" | "null" | "object")[] } @@ -456,7 +461,7 @@ export interface DiscriminatorObject { * [4.8.26] XML Object * A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are not inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior. */ -export interface XMLObject { +export interface XMLObject extends Extensable { /** Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. */ name?: string; /** The URI of the namespace definition. This MUST be in the form of an absolute URI. */ @@ -476,6 +481,7 @@ export interface XMLObject { export type SecuritySchemeObject = { /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */ description?: string; + [key: `x-${string}`]: any; } & ( | { /** REQUIRED. The type of the security scheme. */ @@ -515,7 +521,7 @@ export type SecuritySchemeObject = { * [4.8.26] OAuth Flows Object * Allows configuration of the supported OAuth Flows. */ -export interface OAuthFlowsObject { +export interface OAuthFlowsObject extends Extensable { /** Configuration for the OAuth Implicit flow */ implicit?: OAuthFlowObject; /** Configuration for the OAuth Resource Owner Password flow */ @@ -530,7 +536,7 @@ export interface OAuthFlowsObject { * [4.8.29] OAuth Flow Object * Configuration details for a supported OAuth Flow */ -export interface OAuthFlowObject { +export interface OAuthFlowObject extends Extensable { /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */ authorizationUrl: string; /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */ @@ -598,6 +604,18 @@ export interface OpenAPITSOptions { inject?: string; } +/** Subschema discriminator (note: only valid $ref types accepted here) */ +export type Subschema = + | { hint: "LinkObject"; schema: LinkObject } + | { hint: "HeaderObject"; schema: HeaderObject } + | { hint: "MediaTypeObject"; schema: MediaTypeObject } + | { hint: "OpenAPI3"; schema: OpenAPI3 } + | { hint: "OperationObject"; schema: OperationObject } + | { hint: "ParameterObject"; schema: ParameterObject } + | { hint: "RequestBodyObject"; schema: RequestBodyObject } + | { hint: "ResponseObject"; schema: ResponseObject } + | { hint: "SchemaObject"; schema: SchemaObject }; + /** Context passed to all submodules */ export interface GlobalContext { additionalProperties: boolean; @@ -608,8 +626,8 @@ export interface GlobalContext { postTransform: OpenAPITSOptions["postTransform"]; immutableTypes: boolean; indentLv: number; + operations: Record; pathParamsAsTypes: boolean; silent: boolean; - subschemaID?: string; supportArrayLength: boolean; } diff --git a/src/utils.ts b/src/utils.ts index aa8c90190..933aebcb4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,3 +1,11 @@ +import c from "ansi-colors"; +import { isAbsolute } from "node:path"; +import supportsColor from "supports-color"; + +if (!supportsColor.stdout || supportsColor.stdout.hasBasic === false) c.enabled = false; + +export { c }; + type CommentObject = { const?: unknown; // jsdoc without value default?: unknown; // jsdoc with value @@ -19,8 +27,24 @@ const ESC_0_RE = /~0/g; const ESC_1_RE = /~1/g; const TILDE_RE = /~/g; const FS_RE = /\//g; +export const TS_INDEX_RE = /\[("(\\"|[^"])+"|'(\\'|[^'])+')]/g; // splits apart TS indexes (and allows for escaped quotes) const TS_UNION_INTERSECTION_RE = /[&|]/; -const JS_OBJ_KEY = /^[A-Za-z0-9_$]+$/; +const JS_OBJ_KEY = /^(\d+|[A-Za-z_$][A-Za-z0-9_$]*)$/; + +/** Walk through any JSON-serializable object */ +export function walk( + obj: unknown, + cb: (value: Record, path: (string | number)[]) => void, + path: (string | number)[] = [] +): void { + if (!obj || typeof obj !== "object") return; + if (Array.isArray(obj)) { + for (let i = 0; i < obj.length; i++) walk(obj[i], cb, path.concat(i)); + return; + } + cb(obj as any, path); + for (const k of Object.keys(obj)) walk((obj as any)[k], cb, path.concat(k)); +} /** * Preparing comments from fields @@ -82,20 +106,19 @@ export function comment(text: string, indentLv?: number): string { } /** handle any valid $ref */ -export function parseRef(ref: string): { url?: string; parts: string[] } { - if (typeof ref !== "string" || !ref.includes("#")) return { parts: [] }; - const [url, parts] = ref.split("#"); +export function parseRef(ref: string): { filename: string; path: string[] } { + if (typeof ref !== "string") return { filename: ".", path: [] }; + if (!ref.includes("#")) return { filename: ref, path: [] }; + const [filename, path] = ref.split("#"); return { - url: url || undefined, - parts: parts + filename: filename || ".", + path: path .split("/") // split by special character - .filter((p) => !!p) // remove empty parts + .filter((p) => !!p && p !== "properties") // remove empty parts and "properties" (gets flattened by TS) .map(decodeRef), // decode encoded chars }; } -const INDEX_PARTS_RE = /\[("(\\"|[^"])+"|'(\\'|[^'])+')]/g; - /** Parse TS index */ export function parseTSIndex(type: string): string[] { const parts: string[] = []; @@ -103,7 +126,7 @@ export function parseTSIndex(type: string): string[] { if (bracketI === -1) return [type]; parts.push(type.substring(0, bracketI)); - const matches = type.match(INDEX_PARTS_RE); + const matches = type.match(TS_INDEX_RE); if (matches) { for (const m of matches) parts.push(m.substring('["'.length, m.length - '"]'.length)); } @@ -111,12 +134,10 @@ export function parseTSIndex(type: string): string[] { } /** Make TS index */ -export function makeTSIndex(parts: string[]): string { +export function makeTSIndex(parts: (string | number)[]): string { return `${parts[0]}[${parts.slice(1).map(escStr).join("][")}]`; } -export type ParsedSimpleValue = string | number | boolean; - /** decode $ref (https://swagger.io/docs/specification/using-ref/#escape) */ export function decodeRef(ref: string): string { return ref.replace(ESC_0_RE, "~").replace(ESC_1_RE, "/").replace(DOUBLE_QUOTE_RE, '\\"'); @@ -181,7 +202,7 @@ export function tsUnionOf(...types: Array): string { } /** escape string value */ -export function escStr(input: string): string { +export function escStr(input: any): string { if (typeof input !== "string") return input; return `"${input.trim().replace(DOUBLE_QUOTE_RE, '\\"')}"`; } @@ -203,13 +224,18 @@ export function getEntries(obj: ArrayLike | Record, alphabetize return entries; } -/** verify OpenAPI version of an unknown schema */ -export function checkOpenAPIVersion(schema: Record): void { - if ("swagger" in schema && typeof schema.swagger === "string") - throw new Error("Swagger 2.0 and older no longer supported. Please use v5."); - if ("openapi" in schema && typeof schema.openapi === "string") { - const version = parseInt(schema.openapi); - if (version <= 2 || version >= 4) - throw new Error(`Unknown OpenAPI version "${schema.version}". Only 3.x is supported.`); - } +/** print error message */ +export function error(msg: string) { + console.error(c.red(` ✘ ${msg}`)); +} + +/** is the given string a remote URL */ +export function isRemoteURL(url: string): boolean { + // believe it or not, this is faster than RegEx + return url.startsWith("https://") || url.startsWith("//") || url.startsWith("http://"); +} + +/** is the given string a filepath? */ +export function isFilepath(url: string): boolean { + return url.startsWith("file://") || isAbsolute(url); } diff --git a/test/cli.test.ts b/test/cli.test.ts index 33bdccec6..2450b2d52 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -6,25 +6,38 @@ const cwd = new URL("../", import.meta.url); const cmd = "./bin/cli.js"; describe("CLI", () => { + // note: the snapshots in index.test.ts test the Node API; these test the CLI describe("snapshots", () => { test("GitHub API", async () => { const expected = fs.readFileSync(new URL("./examples/github-api.ts", cwd), "utf8").trim(); const { stdout } = await execa(cmd, ["./test/fixtures/github-api.yaml"], { cwd }); expect(stdout).toBe(expected); - }); + }, 30000); + test("GitHub API (next)", async () => { + const expected = fs.readFileSync(new URL("./examples/github-api-next.ts", cwd), "utf8").trim(); + const { stdout } = await execa(cmd, ["./test/fixtures/github-api-next.yaml"], { cwd }); + expect(stdout).toBe(expected); + }, 30000); test("Stripe API", async () => { const expected = fs.readFileSync(new URL("./examples/stripe-api.ts", cwd), "utf8").trim(); - const { stdout } = await execa(cmd, ["./test/fixtures/stripe-api.yaml"], { - cwd, - }); + const { stdout } = await execa(cmd, ["./test/fixtures/stripe-api.yaml"], { cwd }); expect(stdout).toBe(expected); - }); + }, 30000); + test("DigitalOcean API (remote $refs)", async () => { + const expected = fs.readFileSync(new URL("./examples/digital-ocean-api.ts", cwd), "utf8").trim(); + const { stdout } = await execa( + cmd, + ["./test/fixtures/digital-ocean-api/specification/DigitalOcean-public.v2.yaml"], + { cwd } + ); + expect(stdout).toBe(expected); + }, 60000); test("stdin", async () => { const expected = fs.readFileSync(new URL("./examples/stripe-api.ts", cwd), "utf8").trim(); const input = fs.readFileSync(new URL("./test/fixtures/stripe-api.yaml", cwd)); const { stdout } = await execa(cmd, { input }); expect(stdout).toBe(expected); - }); + }, 30000); }); describe("flags", () => { diff --git a/test/components-object.test.ts b/test/components-object.test.ts index bcad041a4..10103824a 100644 --- a/test/components-object.test.ts +++ b/test/components-object.test.ts @@ -1,21 +1,19 @@ -import type { ComponentsObject } from "../src/types"; -import transformComponentsObject, { TransformComponentsObjectOptions } from "../src/transform/components-object.js"; +import type { ComponentsObject, GlobalContext } from "../src/types"; +import transformComponentsObject from "../src/transform/components-object.js"; -const options: TransformComponentsObjectOptions = { +const options: GlobalContext = { + additionalProperties: false, + alphabetize: false, + defaultNonNullable: false, + discriminators: {}, + immutableTypes: false, + indentLv: 0, operations: {}, - ctx: { - additionalProperties: false, - alphabetize: false, - defaultNonNullable: false, - discriminators: {}, - immutableTypes: false, - indentLv: 0, - pathParamsAsTypes: false, - postTransform: undefined, - silent: true, - supportArrayLength: false, - transform: undefined, - }, + pathParamsAsTypes: false, + postTransform: undefined, + silent: true, + supportArrayLength: false, + transform: undefined, }; const basicSchema: ComponentsObject = { @@ -90,9 +88,11 @@ describe("Components Object", () => { Search: string; }; requestBodies: { - UploadUser: { - "application/json": { - email: string; + UploadUser?: { + content: { + "application/json": { + email: string; + }; }; }; }; @@ -139,7 +139,7 @@ describe("Components Object", () => { }, }, }; - const generated = transformComponentsObject(schema, { ...options, ctx: { ...options.ctx, alphabetize: true } }); + const generated = transformComponentsObject(schema, { ...options, alphabetize: true }); expect(generated).toBe(`{ schemas: { Alpha: { @@ -167,10 +167,7 @@ describe("Components Object", () => { }); describe("immutableTypes", () => { test("true", () => { - const generated = transformComponentsObject(basicSchema, { - ...options, - ctx: { ...options.ctx, immutableTypes: true }, - }); + const generated = transformComponentsObject(basicSchema, { ...options, immutableTypes: true }); expect(generated).toBe(`{ schemas: { readonly String: string; @@ -189,9 +186,11 @@ describe("Components Object", () => { readonly Search: string; }; requestBodies: { - readonly UploadUser: { - readonly "application/json": { - readonly email: string; + readonly UploadUser?: { + readonly content: { + readonly "application/json": { + readonly email: string; + }; }; }; }; diff --git a/test/fixtures/.keep b/test/fixtures/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/header-object.test.ts b/test/header-object.test.ts index 05e2761f4..97bb26367 100644 --- a/test/header-object.test.ts +++ b/test/header-object.test.ts @@ -10,6 +10,7 @@ const options: TransformHeaderObjectOptions = { discriminators: {}, immutableTypes: false, indentLv: 0, + operations: {}, pathParamsAsTypes: false, postTransform: undefined, silent: true, diff --git a/test/index.test.ts b/test/index.test.ts index c778d67b1..682735cd2 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { OpenAPI3 } from "types.js"; +import { OpenAPI3 } from "../src/types"; import openapiTS from "../dist/index.js"; const BOILERPLATE = `/** @@ -14,12 +14,63 @@ type XOR = (T | U) extends object ? (Without & U) | (Without & type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; `; +beforeAll(() => { + vi.spyOn(process, "exit").mockImplementation(((code: number) => { + throw new Error(`Process exited with error code ${code}`); + }) as any); +}); + describe("openapiTS", () => { + beforeAll(() => { + vi.spyOn(process, "exit").mockImplementation((() => {}) as any); + }); + + describe("3.0", () => { + test("custom properties", async () => { + const generated = await openapiTS({ + openapi: "3.0", + info: { title: "Test", version: "1.0" }, + components: { + schemas: { + Base: { + type: "object", + additionalProperties: { type: "string" }, + }, + SchemaType: { + oneOf: [{ $ref: "#/components/schemas/Base" }, { $ref: "#/x-swagger-bake/components/schemas/Extension" }], + }, + }, + }, + }); + expect(generated).toBe(`${BOILERPLATE} +export type paths = Record; + +export interface components { + schemas: { + Base: { + [key: string]: string | undefined; + }; + SchemaType: components["schemas"]["Base"]; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; +`); + }); + }); + describe("3.1", () => { test("discriminator", async () => { const schema: OpenAPI3 = { openapi: "3.1", - info: { title: "test", version: "3.1" }, + info: { title: "test", version: "1.0" }, components: { schemas: { Pet: { @@ -30,7 +81,7 @@ describe("openapiTS", () => { }, Cat: { allOf: [ - { $ref: 'components["schemas"]["Pet"]' }, + { $ref: "#/components/schemas/Pet" }, { type: "object", properties: { name: { type: "string" } }, @@ -39,7 +90,7 @@ describe("openapiTS", () => { }, Dog: { allOf: [ - { $ref: 'components["schemas"]["Pet"]' }, + { $ref: "#/components/schemas/Pet" }, { type: "object", properties: { bark: { type: "string" } }, @@ -48,7 +99,7 @@ describe("openapiTS", () => { }, Lizard: { allOf: [ - { $ref: 'components["schemas"]["Pet"]' }, + { $ref: "#/components/schemas/Pet" }, { type: "object", properties: { lovesRocks: { type: "boolean" } }, @@ -90,9 +141,54 @@ export interface components { pathItems: never; } +export type external = Record; + export type operations = Record; +`); + }); + + test("$ref properties", async () => { + const schema: OpenAPI3 = { + openapi: "3.1", + info: { title: "Test", version: "1.0" }, + components: { + schemas: { + ObjRef: { + type: "object", + properties: { + base: { $ref: "#/components/schemas/Entity/properties/foo" }, + }, + }, + AllOf: { + allOf: [ + { $ref: "#/components/schemas/Entity/properties/foo" }, + { $ref: "#/components/schemas/Thingy/properties/bar" }, + ], + }, + }, + }, + }; + const generated = await openapiTS(schema); + expect(generated).toBe(`${BOILERPLATE} +export type paths = Record; + +export interface components { + schemas: { + ObjRef: { + base?: components["schemas"]["Entity"]["foo"]; + }; + AllOf: components["schemas"]["Entity"]["foo"] & components["schemas"]["Thingy"]["bar"]; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} export type external = Record; + +export type operations = Record; `); }); }); @@ -100,24 +196,23 @@ export type external = Record; describe("options", () => { describe("exportTypes", () => { test("false", async () => { - expect( - await openapiTS( - { - openapi: "3.1", - info: { title: "Test", version: "3.1" }, - components: { - schemas: { - User: { - type: "object", - properties: { name: { type: "string" }, email: { type: "string" } }, - required: ["name", "email"], - }, + const generated = await openapiTS( + { + openapi: "3.1", + info: { title: "Test", version: "1.0" }, + components: { + schemas: { + User: { + type: "object", + properties: { name: { type: "string" }, email: { type: "string" } }, + required: ["name", "email"], }, }, }, - { exportType: false } - ) - ).toBe(`${BOILERPLATE} + }, + { exportType: false } + ); + expect(generated).toBe(`${BOILERPLATE} export type paths = Record; export interface components { @@ -134,31 +229,30 @@ export interface components { pathItems: never; } -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); test("true", async () => { - expect( - await openapiTS( - { - openapi: "3.1", - info: { title: "Test", version: "3.1" }, - components: { - schemas: { - User: { - type: "object", - properties: { name: { type: "string" }, email: { type: "string" } }, - required: ["name", "email"], - }, + const generated = await openapiTS( + { + openapi: "3.1", + info: { title: "Test", version: "1.0" }, + components: { + schemas: { + User: { + type: "object", + properties: { name: { type: "string" }, email: { type: "string" } }, + required: ["name", "email"], }, }, }, - { exportType: true } - ) - ).toBe(`${BOILERPLATE} + }, + { exportType: true } + ); + expect(generated).toBe(`${BOILERPLATE} export type paths = Record; export type components = { @@ -175,9 +269,9 @@ export type components = { pathItems: never; }; -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); }); @@ -185,7 +279,7 @@ export type external = Record; describe("pathParamsAsTypes", () => { const schema: OpenAPI3 = { openapi: "3.1", - info: { title: "Test", version: "3.1" }, + info: { title: "Test", version: "1.0" }, paths: { "/user/{user_id}": { parameters: [{ name: "user_id", in: "path" }], @@ -194,7 +288,8 @@ export type external = Record; }; test("false", async () => { - expect(await openapiTS(schema, { pathParamsAsTypes: false })).toBe(`${BOILERPLATE} + const generated = await openapiTS(schema, { pathParamsAsTypes: false }); + expect(generated).toBe(`${BOILERPLATE} export interface paths { "/user/{user_id}": { parameters: { @@ -207,14 +302,15 @@ export interface paths { export type components = Record; -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); test("true", async () => { - expect(await openapiTS(schema, { pathParamsAsTypes: true })).toBe(`${BOILERPLATE} + const generated = await openapiTS(schema, { pathParamsAsTypes: true }); + expect(generated).toBe(`${BOILERPLATE} export interface paths { [path: \`/user/\${string}\`]: { parameters: { @@ -227,9 +323,9 @@ export interface paths { export type components = Record; -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); }); @@ -237,7 +333,7 @@ export type external = Record; describe("transform/postTransform", () => { const schema: OpenAPI3 = { openapi: "3.1", - info: { title: "Test", version: "3.1" }, + info: { title: "Test", version: "1.0" }, components: { schemas: { Date: { type: "string", format: "date-time" }, @@ -246,13 +342,12 @@ export type external = Record; }; test("transform", async () => { - expect( - await openapiTS(schema, { - transform(node) { - if ("format" in node && node.format === "date-time") return "Date"; - }, - }) - ).toBe(`${BOILERPLATE} + const generated = await openapiTS(schema, { + transform(node) { + if ("format" in node && node.format === "date-time") return "Date"; + }, + }); + expect(generated).toBe(`${BOILERPLATE} export type paths = Record; export interface components { @@ -267,22 +362,21 @@ export interface components { pathItems: never; } -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); test("postTransform (with inject)", async () => { const inject = `type DateOrTime = Date | number;\n`; - expect( - await openapiTS(schema, { - postTransform(type, options) { - if (options.path.includes("Date")) return "DateOrTime"; - }, - inject, - }) - ).toBe(`${BOILERPLATE} + const generated = await openapiTS(schema, { + postTransform(type, options) { + if (options.path.includes("Date")) return "DateOrTime"; + }, + inject, + }); + expect(generated).toBe(`${BOILERPLATE} ${inject} export type paths = Record; @@ -298,27 +392,44 @@ export interface components { pathItems: never; } -export type operations = Record; - export type external = Record; + +export type operations = Record; `); }); }); }); + // note: this tests the Node API; the snapshots in cli.test.ts test the CLI describe("snapshots", () => { + const EXAMPLES_DIR = new URL("../examples/", import.meta.url); + const FIXTURES_DIR = new URL("./fixtures/", import.meta.url); + describe("GitHub", () => { test("default options", async () => { - const generated = await openapiTS(new URL("./fixtures/github-api.yaml", import.meta.url)); - expect(generated).toBe(fs.readFileSync(new URL("../examples/github-api.ts", import.meta.url), "utf8")); - }); + const generated = await openapiTS(new URL("./github-api.yaml", FIXTURES_DIR)); + expect(generated).toBe(fs.readFileSync(new URL("./github-api.ts", EXAMPLES_DIR), "utf8")); + }, 30000); + }); + describe("GitHub (next)", () => { + test("default options", async () => { + const generated = await openapiTS(new URL("./github-api-next.yaml", FIXTURES_DIR)); + expect(generated).toBe(fs.readFileSync(new URL("./github-api-next.ts", EXAMPLES_DIR), "utf8")); + }, 30000); }); - describe("Stripe", () => { test("default options", async () => { - const generated = await openapiTS(new URL("./fixtures/stripe-api.yaml", import.meta.url)); - expect(generated).toBe(fs.readFileSync(new URL("../examples/stripe-api.ts", import.meta.url), "utf8")); - }); + const generated = await openapiTS(new URL("./stripe-api.yaml", FIXTURES_DIR)); + expect(generated).toBe(fs.readFileSync(new URL("./stripe-api.ts", EXAMPLES_DIR), "utf8")); + }, 30000); + }); + describe("DigitalOcean", () => { + test("default options", async () => { + const generated = await openapiTS( + new URL("./digital-ocean-api/specification/DigitalOcean-public.v2.yaml", FIXTURES_DIR) + ); + expect(generated).toBe(fs.readFileSync(new URL("./digital-ocean-api.ts", EXAMPLES_DIR), "utf8")); + }, 60000); }); }); }); diff --git a/test/invalid.test.ts b/test/invalid.test.ts new file mode 100644 index 000000000..f03d924be --- /dev/null +++ b/test/invalid.test.ts @@ -0,0 +1,32 @@ +import { SpyInstance } from "vitest"; +import openapiTS from "../dist/index.js"; + +describe("Invalid schemas", () => { + let consoleError: SpyInstance; + let procExit: SpyInstance; + + beforeEach(() => { + consoleError = vi.spyOn(console, "error").mockImplementation(() => {}); + procExit = vi.spyOn(process, "exit").mockImplementation((() => {}) as any); + }); + + afterAll(() => { + vi.resetAllMocks(); + }); + + test("Swagger 2.0 throws", async () => { + await openapiTS({ swagger: "2.0" } as any); + expect(consoleError).toHaveBeenCalledWith( + expect.stringContaining("Swagger 2.0 and older no longer supported. Please use v5.") + ); + expect(procExit).toHaveBeenCalledWith(1); + }); + + test("OpenAPI < 3 throws", async () => { + await openapiTS({ openapi: "2.0", info: { title: "Test", version: "1.0" } }); + expect(consoleError).toHaveBeenCalledWith( + expect.stringContaining('Unsupported OpenAPI version "2.0". Only 3.x is supported.') + ); + expect(procExit).toHaveBeenCalledWith(1); + }); +}); diff --git a/test/path-item-object.test.ts b/test/path-item-object.test.ts index 772cb8adf..2a2705189 100644 --- a/test/path-item-object.test.ts +++ b/test/path-item-object.test.ts @@ -2,7 +2,6 @@ import type { PathItemObject } from "../src/types"; import transformPathItemObject, { TransformPathItemObjectOptions } from "../src/transform/path-item-object.js"; const options: TransformPathItemObjectOptions = { - operations: {}, path: "#/test/path-item", ctx: { additionalProperties: false, @@ -11,6 +10,7 @@ const options: TransformPathItemObjectOptions = { discriminators: {}, immutableTypes: false, indentLv: 0, + operations: {}, pathParamsAsTypes: false, postTransform: undefined, silent: true, @@ -24,7 +24,20 @@ describe("Path Item Object", () => { const schema: PathItemObject = { get: { responses: { - 200: { $ref: 'components["responses"]["AllGood"]' }, + 200: { + description: "OK", + content: { + "application/json": { + schema: { + type: "object", + properties: { + success: { type: "boolean" }, + }, + required: ["success"], + }, + }, + }, + }, 404: { $ref: 'components["responses"]["NotFound"]' }, }, }, @@ -44,13 +57,22 @@ describe("Path Item Object", () => { expect(generated).toBe(`{ get: { responses: { - 200: components["responses"]["AllGood"]; + /** @description OK */ + 200: { + content: { + "application/json": { + success: boolean; + }; + }; + }; 404: components["responses"]["NotFound"]; }; }; post: { requestBody?: { - "application/json": components["schemas"]["User"]; + content: { + "application/json": components["schemas"]["User"]; + }; }; responses: { 200: components["responses"]["AllGood"]; @@ -59,4 +81,49 @@ describe("Path Item Object", () => { }; }`); }); + + test("operations", () => { + const operations: Record = {}; + const schema: PathItemObject = { + get: { + operationId: "getUser", + responses: { + 200: { + description: "Get User", + content: { + "application/json": { + schema: { + type: "object", + properties: { + url: { type: "string" }, + "content-type": { type: "string" }, + }, + required: ["url"], + }, + }, + }, + }, + }, + }, + }; + const generated = transformPathItemObject(schema, { ...options, ctx: { ...options.ctx, operations } }); + expect(generated).toBe(`{ + get: operations["getUser"]; +}`); + expect(operations).toEqual({ + getUser: `{ + responses: { + /** @description Get User */ + 200: { + content: { + "application/json": { + url: string; + "content-type"?: string; + }; + }; + }; + }; + }`, + }); + }); }); diff --git a/test/paths-object.test.ts b/test/paths-object.test.ts index e4e3a523d..b53d7a227 100644 --- a/test/paths-object.test.ts +++ b/test/paths-object.test.ts @@ -1,19 +1,19 @@ -import type { PathsObject } from "../src/types"; -import transformPathsObject, { TransformPathsObjectOptions } from "../src/transform/paths-object.js"; +import type { GlobalContext, PathsObject } from "../src/types"; +import transformPathsObject from "../src/transform/paths-object.js"; -const options: TransformPathsObjectOptions = { +const options: GlobalContext = { + additionalProperties: false, + alphabetize: false, + defaultNonNullable: false, + discriminators: {}, + immutableTypes: false, + indentLv: 0, operations: {}, - ctx: { - additionalProperties: false, - alphabetize: false, - defaultNonNullable: false, - discriminators: {}, - immutableTypes: false, - indentLv: 0, - pathParamsAsTypes: false, - silent: true, - supportArrayLength: false, - }, + pathParamsAsTypes: false, + postTransform: undefined, + silent: true, + supportArrayLength: false, + transform: undefined, }; describe("Paths Object", () => { diff --git a/test/request-body-object.test.ts b/test/request-body-object.test.ts index dd8d35945..4f1597f4b 100644 --- a/test/request-body-object.test.ts +++ b/test/request-body-object.test.ts @@ -10,6 +10,7 @@ const options: TransformRequestBodyObjectOptions = { discriminators: {}, immutableTypes: false, indentLv: 0, + operations: {}, pathParamsAsTypes: false, postTransform: undefined, silent: true, @@ -36,9 +37,11 @@ describe("Request Body Object", () => { }; const generated = transformRequestBodyObject(schema, options); expect(generated).toBe(`{ - "application/json": { - url: string; - "content-type"?: string; + content: { + "application/json": { + url: string; + "content-type"?: string; + }; }; }`); }); diff --git a/test/schema-object.test.ts b/test/schema-object.test.ts index 206c484e7..939497d1b 100644 --- a/test/schema-object.test.ts +++ b/test/schema-object.test.ts @@ -10,6 +10,7 @@ const options: TransformSchemaObjectOptions = { discriminators: {}, immutableTypes: false, indentLv: 0, + operations: {}, pathParamsAsTypes: false, postTransform: undefined, silent: true, @@ -138,6 +139,14 @@ describe("Schema Object", () => { const generated = transformSchemaObject({ type: ["string", "boolean", "number", "null"] }, options); expect(generated).toBe("OneOf<[string, boolean, number, null]>"); }); + + test("enum + polymorphism + nullable", () => { + const generated = transformSchemaObject( + { type: ["string", "null"], enum: ["", "false positive", "won't fix", "used in tests"] }, + options + ); + expect(generated).toBe(`"" | "false positive" | "won't fix" | "used in tests" | null`); + }); }); }); @@ -264,17 +273,32 @@ describe("Schema Object", () => { describe("supportArrayLength", () => { test("true", () => { const opts = { ...options, ctx: { ...options.ctx, supportArrayLength: true } }; - expect(transformSchemaObject({ type: "array", items: { type: "string" } }, options)).to.equal(`(string)[]`); - expect(transformSchemaObject({ type: "array", items: { type: "string" }, minItems: 1 }, opts)).to.equal( + expect(transformSchemaObject({ type: "array", items: { type: "string" } }, options)).toBe(`(string)[]`); + expect(transformSchemaObject({ type: "array", items: { type: "string" }, minItems: 1 }, opts)).toBe( `[string, ...(string)[]]` ); - expect(transformSchemaObject({ type: "array", items: { type: "string" }, maxItems: 2 }, opts)).to.equal( + expect(transformSchemaObject({ type: "array", items: { type: "string" }, maxItems: 2 }, opts)).toBe( `[] | [string] | [string, string]` ); - expect(transformSchemaObject({ type: "array", items: { type: "string" }, maxItems: 20 }, opts)).to.equal( + expect(transformSchemaObject({ type: "array", items: { type: "string" }, maxItems: 20 }, opts)).toBe( `(string)[]` ); }); }); }); }); + +describe("ReferenceObject", () => { + it("x-* properties are ignored", () => { + expect( + transformSchemaObject( + { + type: "object", + properties: { string: { type: "string" } }, + "x-extension": true, + }, + options + ) + ).toBe("{\n string?: string;\n}"); + }); +}); diff --git a/test/swagger.v2.test.ts b/test/swagger.v2.test.ts deleted file mode 100644 index b500f19d6..000000000 --- a/test/swagger.v2.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import openapiTS from "../dist/index.js"; - -describe("Swagger 2.0", () => { - test("it throws error", async () => { - await expect( - (async () => { - await openapiTS({ swagger: "2.0" } as any); - })() - ).rejects.toThrowError("Swagger 2.0 and older no longer supported. Please use v5."); - }); -}); diff --git a/tsconfig.build.json b/tsconfig.build.json index 090acfbde..2d138c50b 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "exclude": ["test", "*.ts"] + "exclude": ["scripts", "test", "*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index e2ec33294..7c558a030 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + clearMocks: true, globals: true, }, });